pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: dnsl48@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15631: Generated as identity field in a temporary table with on commit drop corrupts system catalogs
Date: Fri, 15 Feb 2019 17:03:29 +0100
Message-ID: <99401209-fb88-036d-c93f-dbe5211a091a@2ndquadrant.com> (raw)
In-Reply-To: <32505.1550241839@sss.pgh.pa.us>
References: <15631-188663b383e1e697@postgresql.org>
	<24188.1549917188@sss.pgh.pa.us>
	<043b0c10-5a27-b9ff-7451-b8a2ca9327b1@2ndquadrant.com>
	<31358.1549981670@sss.pgh.pa.us>
	<20190213023817.GD5746@paquier.xyz>
	<20190213044104.GE5746@paquier.xyz>
	<0bc96c3e-8a3f-414f-8ba7-f7f95a787d48@2ndquadrant.com>
	<32505.1550241839@sss.pgh.pa.us>

On 2019-02-15 15:43, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
>> What is the general coding principle here?  "You need an CCI $WHEN"?
> 
> The general principle is "there should be a CCI after each independent
> set of data/catalog changes".  You don't typically need CCI between
> the primitive actions of a single DDL statement like CREATE SEQUENCE,
> because you know that those actions are independent and don't look at
> each others' output.  But you need one at the end, in case whatever
> happens next should be able to see the results of the statement.

Yeah, I'm OK on that, but that's not really the problem here.  This is
not a case where a later step in a complex DDL command needs to see what
an earlier step did.  This is about that something later in the
transaction needs to see what happened earlier in the transaction.  This
does not seem to be the job of each individual DDL command; they don't
know what someone later might want to look at.  Otherwise many DDL
command implementations are lacking this CCI.  I think the CCI should be
more like at the end of ProcessUtility().

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (23+ messages)  latest in thread

Message-ID: <99401209-fb88-036d-c93f-dbe5211a091a@2ndquadrant.com>
Permalink:  ../99401209-fb88-036d-c93f-dbe5211a091a@2ndquadrant.com/
Also on:    postgresql.org/message-id/99401209-fb88-036d-c93f-dbe5211a091a@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, tgl@sss.pgh.pa.us, michael@paquier.xyz, dnsl48@gmail.com
  Subject: Re: BUG #15631: Generated as identity field in a temporary table with on commit drop corrupts system catalogs
  In-Reply-To: <99401209-fb88-036d-c93f-dbe5211a091a@2ndquadrant.com>
  References: <15631-188663b383e1e697@postgresql.org> <24188.1549917188@sss.pgh.pa.us> <043b0c10-5a27-b9ff-7451-b8a2ca9327b1@2ndquadrant.com> <31358.1549981670@sss.pgh.pa.us> <20190213023817.GD5746@paquier.xyz> <20190213044104.GE5746@paquier.xyz> <0bc96c3e-8a3f-414f-8ba7-f7f95a787d48@2ndquadrant.com> <32505.1550241839@sss.pgh.pa.us> <99401209-fb88-036d-c93f-dbe5211a091a@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox