Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've a PostgreSQL cluster running on Amazon AWS EC2 instances with streaming replication and "hot standby" option enabled. I'm now gradually upgrading it from Ubuntu 11.10 to Ubuntu 12.04 LTS and I've started just with a few slave instances.

I don't understand why but it seems that from Ubuntu 11.10 to 12.04 the replication lag differs a lot. The instances are in the same region, availability zone, same type, same EBS disks IOPS....

The differences between the two instances are:

  • Ubuntu release: oneiric to precise -> kernel from 3.0.0-30 to 3.2.0-52
  • PostgreSQL package: same repository (, same code version (9.2.4-0ppa1) just different os version (oneiric to precise)

The replication lag is calculated with:

SELECT EXTRACT(MILLISECONDS FROM now() - pg_last_xact_replay_timestamp())

Here are the graphs of the last 12 hours (here the trend is not so bad):

Is there something that I don't get?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.