Hi folks,
I believe we have found another bug in Postgres when using pg_auto_failover. The details can be seen at https://github.com/citusdata/pg_auto_failover/issues/814 ; and the Postgres warning message to consider is the following:
WARNING: oldest xmin is far in the past
When a replication slot switches from active to inactive, whatever xmin value that is registered on the replication slot is then kept.
It seems to me that we should either document that a replication slot that has been active (used in streaming replication) can not be maintained through calls to pg_replication_slot_advance later; or better yet that this should be made to work, somehow.
Regards,
--
Dimitri Fontaine
PostgreSQL Major Contributor, Citus Data, Microsoft
Author of “The Art of PostgreSQL”