From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: phb07 <phb07@apra.asso.fr>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Andrew Gierth <rhodiumtoad@postgresql.org>
Cc: PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14808: V10-beta4, backend abort
Date: Mon, 11 Sep 2017 15:24:40 -0400
Message-ID: <13984.1505157880@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoZO2JJzG0QFYHzgAY6E2hQwwbicYdxWGng0aFfg3RBuRQ@mail.gmail.com>
References: <20170909064853.25630.12825@wrigleys.postgresql.org>
<CAB7nPqRBE35VOtvU=VfV66sqvV5L+raGi8R64WBD3jjS3G4HZA@mail.gmail.com>
<3702.1504976930@sss.pgh.pa.us>
<CA+TgmoZO2JJzG0QFYHzgAY6E2hQwwbicYdxWGng0aFfg3RBuRQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Robert Haas <robertmhaas@gmail.com> writes:
> On Sat, Sep 9, 2017 at 1:08 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> My first instinct is to get rid of DestroyTransitionCaptureState
>> altogether, on the grounds that the TransitionCaptureState will
>> go away at transaction cleanup and we can't really get rid of it
>> any sooner than that.
> End of transaction, or end of query? I'm not sure what happens when
> triggers are deferred, but I think there are a lot of cases when we
> want to throw away the tuplestore immediately, not hold on to it for
> the rest of the transaction.
As things stand, it's end of subtransaction, because the TCSes
are allocated in CurTransactionContext. See the argument in
MakeTransitionCaptureState.
And yes, this is inefficient. The quick-hack patch I committed yesterday
only pays the price if you have RI triggers cascading changes into a table
that also has triggers-with-transition-tables, but I can certainly believe
that it could get expensive in such a case.
The fix proposal discussed downthread should fix the inefficiency as well
as the spec compliance problem. But personally I'm far more worried about
the latter.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, michael.paquier@gmail.com, phb07@apra.asso.fr, thomas.munro@enterprisedb.com, rhodiumtoad@postgresql.org
Subject: Re: BUG #14808: V10-beta4, backend abort
In-Reply-To: <13984.1505157880@sss.pgh.pa.us>
* 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