Re: BUG #14228: replication slot catalog_xmin not cleared on slot reuse

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: BUG #14228: replication slot catalog_xmin not cleared on slot reuse
Date: 2016-07-26 00:58:49
Message-ID: CAB7nPqRLLa-4TiSs0viDOcNBqsx0f5KSHWQAFYF17um1CZHfGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Jul 26, 2016 at 12:25 AM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> * Michael Paquier (michael(dot)paquier(at)gmail(dot)com) wrote:
>> On Wed, Jul 6, 2016 at 12:56 PM, Andrew Gierth
>> <andrew(at)tao11(dot)riddles(dot)org(dot)uk> wrote:
>> >>>>>> "Michael" == Michael Paquier <michael(dot)paquier(at)gmail(dot)com> writes:
>> >
>> > >> 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.
>> >
>> > Michael> Good catch! The same applies to confirmed_flush_lsn, which is
>> > Michael> used only by logical decoding and should remain as NULL for
>> > Michael> physical slots. So I propose the patch attached to address
>> > Michael> both problems.
>> >
>> > What about slot->effective_catalog_xmin ?
>>
>> Yes. I guess so, as well as the other candidate_* fields in the slot
>> to begin from a clean state.
>
> Seems like we should try to get this in before the next round of point
> releases...?

That would be nice, I would guess that Andres or Robert (added in CC)
are the best fits to commit this patch, even if this is just a
variable initialization issue.
--
Michael

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2016-07-26 01:37:37 Re: BUG #13907: Restore materialized view throw permission denied
Previous Message Kevin Grittner 2016-07-25 20:09:37 Re: BUG #13907: Restore materialized view throw permission denied