[HACKERS] Function to control physical replication slot - Mailing list pgsql-hackers

From Magnus Hagander
Subject [HACKERS] Function to control physical replication slot
Date
Msg-id CABUevEwBe0GckQpGxjSLccGR351nzbA3asrwRTVQ5=VV+S0+fQ@mail.gmail.com
Whole thread Raw
Responses Re: [HACKERS] Function to control physical replication slot  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
Is there a particular reason we don't have a function to *set* the restart_lsn of a replication slot, other than to drop it and recreate it?

Similarly, to create one with a fixed value for restart_lsn and not necessarily the one the machine is at right now?

Basically I'm doing a small script that keeps a replication slot on the standby reasonably in sync with the master, for use in the case of a failover.

AFAICT the only way to do it now is to either connect with the replication protocol and actually consume the data (which seems quite wasteful), or to drop and recreate the slot (in which case we can't actually determine the location it gets set to keep, because it will be set to "whatever is current").

--

pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: [HACKERS] postgres_fdw bug in 9.6
Next
From: Amit Langote
Date:
Subject: Re: [HACKERS] Partitioned tables and relfilenode