Re: BUG #15631: Generated as identity field in a temporary table with on commit drop corrupts system catalogs

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, dnsl48(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15631: Generated as identity field in a temporary table with on commit drop corrupts system catalogs
Date: 2019-03-26 02:45:27
Message-ID: 20190326024527.GS2558@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Mar 13, 2019 at 10:28:11AM +0100, Peter Eisentraut wrote:
> /* Need CCI between commands */
> - if (lnext(l) != NULL)
> CommandCounterIncrement();

Hmm. We could actually live with this suggestion, and this impacts
only CREATE TABLE and ALTER TABLE statements. I would still add a CCI
after the internal dependency between the identity sequence and its
root table is recorded though as there could be other callers of the
internal sequence API, so a CCI only in utility.c may not be enough.

> I think we should also make the implicitly created sequence temporary.
> Even though the permanent sequence is cleaned up properly, we should
> avoid having those sequences write to the WAL.

Indeed, sounds good to me.
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2019-03-26 10:59:27 BUG #15714: plctl extension issue
Previous Message Amit Langote 2019-03-26 01:24:52 Re: BUG #15668: Server crash in transformPartitionRangeBounds