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 (launchpad.net/~pitti/+archive/postgresql), 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?