Hello hackers, Attached is a patch which attempts to implement a new system function pg_get_slot_invalidation_cause('slot_name') to get invalidation cause of a replication slot.
Currently, users do not have a way to know the invalidation cause. One can only find out if the slot is invalidated or not by querying the 'conflicting' field of pg_replication_slots. This new function provides a way to query invalidation cause as well. One of the use case scenarios for this function is another ongoing thread "Synchronizing slots from primary to standby" at [1]. This function is needed there to replicate invalidation-cause of a logical replication slot from the primary server to the hot standby. But this is an independent requirement in itself and thus makes sense to have it implemented separately. Please review and provide your feedback. [1]: https://www.postgresql.org/message-id/514f6f2f-6833-4539-39f1-96cd1e011f23%40enterprisedb.com thanks Shveta
v1-0001-Function-to-get-invalidation-cause-of-a-replicati.patch
Description: Binary data