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

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: andrew(at)tao11(dot)riddles(dot)org(dot)uk
Cc: PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14228: replication slot catalog_xmin not cleared on slot reuse
Date: 2016-07-06 02:08:35
Message-ID: CAB7nPqQ6WWipoN3A3g-uWQM=JJcGWSKA8Bw-q3+jXOiuNd-iRw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Jul 6, 2016 at 2:35 AM, <andrew(at)tao11(dot)riddles(dot)org(dot)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 Content-Type Size
fix-repslot-init.patch text/x-diff 774 bytes

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrew Gierth 2016-07-06 03:56:31 Re: BUG #14228: replication slot catalog_xmin not cleared on slot reuse
Previous Message Thomas Munro 2016-07-06 01:32:32 Re: Too slow "Analyze" for the table with data in Thai language