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: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, 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-02-13 02:38:17
Message-ID: 20190213023817.GD5746@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Feb 12, 2019 at 09:27:50AM -0500, Tom Lane wrote:
> Hm, I'd be more inclined to find where the sequence creation is happening
> and add a CCI at the end, because that comports better with the general
> plan for inserting CCIs. There may be other issues of this same sort with
> doing-X-just-after-identity-sequence-creation if you don't fix it that
> way.

Agreed. I don't think that it is the correct logic to put an
after-the-fact CCI just before executing any drop or truncate actions.
It should happen after the creation of the new object so as it becomes
correctly visible within the transaction.
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Langote 2019-02-13 03:02:25 Re: BUG #15623: Inconsistent use of default for updatable view
Previous Message Saul, Jean Paolo 2019-02-13 01:48:21 Re: BUG #15609: synchronous_commit=off insert performance regression with secondary indexes