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

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, 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-28 05:22:29
Message-ID: CAB7nPqQXyffKzejuDwJymQBQAFrYzHgNthY79nRK+FFhm9Yw6Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Jul 28, 2016 at 9:24 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> I think it'd be better if we explicitly zeroed .data - that way the
> likelihood of future bugs of the same ilk is smaller.

Okay, I have spent some time looking at all the fields here, and their
significance before reaching this code path in ReplicationSlotCreate,
but did not find any hole if slot->data is zeroed. So here is an
updated patch. You could get rid of all the field initializations I
have done for slot->data, but I think that's cheap to keep them.
--
Michael

Attachment Content-Type Size
fix-repslot-init-v3.patch application/x-patch 1.1 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message coladict 2016-07-28 13:30:07 BUG #14268: NULL parameter conversion
Previous Message Peter Geoghegan 2016-07-28 01:12:29 Re: BUG #14150: Attempted to delete invisible tuple