Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dt6hN-0003rn-7Y for pgsql-bugs@arkaria.postgresql.org; Sat, 16 Sep 2017 06:35:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dt3wA-0004Ad-5g for pgsql-bugs@arkaria.postgresql.org; Sat, 16 Sep 2017 03:38:34 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dt3w8-00049W-10 for pgsql-bugs@postgresql.org; Sat, 16 Sep 2017 03:38:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dt3w0-0006Hv-Ly; Sat, 16 Sep 2017 03:38:30 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v8G3cK7b021765; Fri, 15 Sep 2017 23:38:20 -0400 From: Tom Lane To: Thomas Munro cc: Michael Paquier , Andrew Gierth , PostgreSQL mailing lists , Kevin Grittner Subject: Re: BUG #14808: V10-beta4, backend abort In-reply-to: References: <20170909064853.25630.12825@wrigleys.postgresql.org> <3702.1504976930@sss.pgh.pa.us> <9324.1504983594@sss.pgh.pa.us> <25326.1505070173@sss.pgh.pa.us> <14016.1505135324@sss.pgh.pa.us> <8201.1505149431@sss.pgh.pa.us> <13342.1505177580@sss.pgh.pa.us> <630.1505425555@sss.pgh.pa.us> <25637.1505489314@sss.pgh.pa.us> <32587.1505503595@sss.pgh.pa.us> Comments: In-reply-to Thomas Munro message dated "Sat, 16 Sep 2017 13:45:27 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21763.1505533100.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 15 Sep 2017 23:38:20 -0400 Message-ID: <21764.1505533100@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Thomas Munro writes: > On Sat, Sep 16, 2017 at 7:26 AM, Tom Lane wrote: >> Attached is an updated patch that incorporates the ideas you suggested. > I was imagining that you would just need to keep a back pointer to the > last queued event for the same (relation, command), since that's the > only one you'd ever need to consider cancelling, and then no scanning > would be needed. I am probably missing something. There could be more than one after-statement trigger, no? >> This is pretty messy but I think it's the best we can do as long as >> RI actions are intermixed with other AFTER ROW triggers. > It does seem like an inconsistency that it would be good to fix, but I > don't immediately see how to make that happen with the current design. > It would be interesting to know what DB2 does here in terms of trigger > execution contexts and transition tables when you have a chain of 2, 3 > and 4 foreign key referential actions. > Is it worth adding a test with an extra level of chaining in the self_ref= case? Would it show anything not shown by the three-level case? > Is it worth adding tests for SET NULL and SET DEFAULT, to exercise the > complete set of referential actions? I think they're all about the same as far as this is concerned. regards, tom lane --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs