From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pg_rewind and replication slots |
Date: | 2018-01-24 02:33:12 |
Message-ID: | 20180124023312.GD1355@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jan 23, 2018 at 08:49:53PM +0100, Laurenz Albe wrote:
> When a primary with replication slots gets reset with pg_rewind,
> it keeps the replication slots.
>
> This does no harm per se, but when it gets promoted again,
> the replication slots are still there and are in the way.
> Won't they also hold back the xmin horizon?
>
> I think that pg_rewind should delete all replication slots.
Definitely agreed, but replications slots are not the only thing to
worry about. There has been a recent discussion on the matter:
https://www.postgresql.org/message-id/20180122201258.GT2416@tamriel.snowman.net
And the conclusion leads to the fact that we want the list of
directories and files that should be excluded from a base backup to
extracted into a header that pg_rewind could use for its own purpose as
it shares a lot in its logic with basebackup.c, and because using a
logic based on an exclusion list is more portable in the long run.
(I do remove pg_replslot's contents after running pg_rewind in my own
failover scripts by the way.)
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2018-01-24 02:45:21 | Re: [HACKERS] parallel.c oblivion of worker-startup failures |
Previous Message | Michael Paquier | 2018-01-24 02:27:29 | Re: Handling better supported channel binding types for SSL implementations |