Hi all
The attached patch adds a test to the TAP logical decoding suite to show that pg_replication_slot_advance() works on a server in standby mode.
I didn't add a full demonstration of how to do failover with logical slots because we're still missing a way to "sync" a logical slot from a primary to a standby, or a way to directly create such a slot safely on a standby in a way that enforces a safe catalog_xmin etc.
You can't replay from the slot unless the server is promoted, so I don't test that.
I'm not sure if anyone's going to find it worth committing, but it's here so searchers can find it at least.