pg.ddx.io pgsql-hackers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: CSStorm occurred again by postgreSQL8.2
Date: Wed, 13 Sep 2006 21:45:35 -0400
Message-ID: <22080.1158198335@sss.pgh.pa.us> (raw)
In-Reply-To: <13251.1157299738@sss.pgh.pa.us>
References: <20060808110913.50FA.ITAGAKI.TAKAHIRO@oss.ntt.co.jp>
<200608260346.k7Q3k2g06954@momjian.us>
<20060828181312.5638.ITAGAKI.TAKAHIRO@oss.ntt.co.jp>
<13251.1157299738@sss.pgh.pa.us>
I wrote:
> ... it seems like in the
> case where RecordSubTransactionCommit detects that the subxact has not
> stored its XID anywhere, we could immediately remove the XID from
> the PGPROC array, just as if it had aborted. This would avoid chewing
> subxid slots for cases such as exception blocks in plpgsql that are
> not modifying the database, but just catching computational errors.
(and later realized that Alvaro had had the same idea awhile back, but
I don't have his message at hand).
I looked into this a bit more; it seems like basically it should only
take addition of
else
XidCacheRemoveRunningXids(xid, 0, NULL);
to the bottom of RecordSubTransactionCommit(), plus suitable adjustment
of the comments in both routines. However, there's a problem: if we
delete a second-level subxact's XID from PGPROC, and later its upper
subtransaction aborts, XidCacheRemoveRunningXids will emit scary
warnings when it doesn't find the sub-subxact in PGPROC. This could
doubtless be fixed with sufficient jiggery-pokery --- simply removing
the debug warnings would be a brute-force answer, but I'd like to find
something a bit less brute-force. Maybe drop the sub-subxact from its
parent's list immediately, instead of carrying it forward?
Anyway, given that there's this one nonobvious gotcha, there might be
others. My recommendation is that we take this off the open-items list
for 8.2 and revisit it in the 8.3 cycle when there's more time.
regards, tom lane
view thread (22+ messages) latest in thread
Message-ID: <22080.1158198335@sss.pgh.pa.us> Permalink: ../22080.1158198335@sss.pgh.pa.us/ Also on: postgresql.org/message-id/22080.1158198335@sss.pgh.pa.us ·
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 using the --to and --cc options: reply via email To: pgsql-hackers@postgresql.org Cc: tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, itagaki.takahiro@oss.ntt.co.jp, bruce@momjian.us Subject: Re: CSStorm occurred again by postgreSQL8.2 In-Reply-To: <22080.1158198335@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