Hi all.
We also have reproduced this behaviour of txid wraparound. pg version 9.0.5.
We have done some test.
We are using hot standby and our chekpoint interval is closly to one
hour (actually, our pg does chekpoints all time). So probability of
intersection active chekpoint and getting max txid is near 100%
First time we got fail whith this wraparound was some month ago during
londiste-replication. and we haven't found any satisfactory
explaination, but now, we get new conditions.
Please, review checkpoint and hotstandy.
Does anybody know this bug exists in head?
We have done our test in 9.2.1 and bug have been found again:
--- checkpoint begin
$ /usr/lib/postgresql/9.2/bin/psql -p 5430 -h `pwd`/s -d postgres -c
'select now(),txid_current(),txid_current()-2^32'
now | txid_current | ?column?
------------------------------+--------------+----------
2012-11-30 19:48:48.57472+04 | 4294967730 | 434
(1 row)
$ /usr/lib/postgresql/9.2/bin/psql -p 5430 -h `pwd`/s -d postgres -c
'select now(),txid_current(),txid_current()-2^32'
now | txid_current | ?column?
-------------------------------+--------------+----------
2012-11-30 19:49:11.758169+04 | 4294967731 | 435
(1 row)
--- checkpoint end
$ /usr/lib/postgresql/9.2/bin/psql -p 5430 -h `pwd`/s -d postgres -c
'select now(),txid_current(),txid_current()-2^32'
now | txid_current | ?column?
-------------------------------+--------------+-------------
2012-11-30 19:51:06.302396+04 | 439 | -4294966857
(1 row)
Note this previous threads: Standbys, txid_current_snapshot,
wraparound http://archives.postgresql.org/pgsql-hackers/2012-06/msg00888.php
--
Sergey Burladyan