Hi, On 2016-10-18 14:57:52 +0200, fredrik@xxxxxxxxxxxxx wrote: > we are running many postgresql master/slave setups. The slaves are > initialised from a pg_basebackup from the master and are sync > streaming from the master. When we determine the master has failed, > the slave is promoted. Some time after that, the old master is again > initialised with a pg_basebackup and starts streaming from the new > master. Could you describe in a bit more detail how exactly you're setting up the standbys? E.g. the exact recovery.conf used, whether you remove any files during starting a standby. Also how exactly you're promoting standbys? > Recently, we have gotten this error a fair amount of times: "out-of-order XID insertion in KnownAssignedXids" when postgresql attempts to start after being initialised with a pg_basebackup from the current master. Which version are you encountering this on precisely? > Once the issue has occurred, a subsequent re-initialisation (with a completely new pg_basebackup) does not resolve the issue. How have you recovered from this so far? > I have a setup in the failing state, so I can produce any kind of log mesages / details that would be helpful. Could you use pg_xlogdump to dump the WAL file on which replay failed? And then attach the output in a compressed manner? Greetings, Andres Freund -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general