Re: BUG #14228: replication slot catalog_xmin not cleared on slot reuse - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #14228: replication slot catalog_xmin not cleared on slot reuse
Date
Msg-id CAB7nPqQ6WWipoN3A3g-uWQM=JJcGWSKA8Bw-q3+jXOiuNd-iRw@mail.gmail.com
Whole thread Raw
In response to BUG #14228: replication slot catalog_xmin not cleared on slot reuse  (andrew@tao11.riddles.org.uk)
Responses Re: BUG #14228: replication slot catalog_xmin not cleared on slot reuse
List pgsql-bugs
On Wed, Jul 6, 2016 at 2:35 AM,  <andrew@tao11.riddles.org.uk> wrote:
> When creating a physical replication slot, the catalog_xmin field of the new
> slot is not initialized. If the slot storage had previously been used for a
> logical slot, the old catalog_xmin will remain in place and interfere with
> vacuum.

Good catch! The same applies to confirmed_flush_lsn, which is used
only by logical decoding and should remain as NULL for physical slots.
So I propose the patch attached to address both problems.
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Too slow "Analyze" for the table with data in Thai language
Next
From: Andrew Gierth
Date:
Subject: Re: BUG #14228: replication slot catalog_xmin not cleared on slot reuse