From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: rlowe@pablowe.net
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6497: Error sent to client, but data written anyway
Date: Tue, 28 Feb 2012 17:42:10 -0500
Message-ID: <29380.1330468930@sss.pgh.pa.us> (raw)
In-Reply-To: <4F4CFA640200002500045CAC@gw.wicourts.gov>
References: <E1S2PqI-0000DP-5q@wrigleys.postgresql.org>
<E1S2PqI-0000DP-5q@wrigleys.postgresql.org>
<23519.1330465109@sss.pgh.pa.us>
<4F4CFA640200002500045CAC@gw.wicourts.gov>
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Huh? If the backend dumped core before you sent it the commit,
>> the data will certainly not be committed. It might be physically
>> present on disk, but it won't be considered valid.
> I suppose that there is a window of time between the commit becoming
> effective and the return to the application which, from a user
> perspective, would be hard to distinguish from what the OP
> described. I don't really see how that can be avoided, though,
> short of a transaction manager using 2PC. Any time the server
> crashes while a COMMIT is pending, one must check to see whether it
> "took".
Yeah, a post-commit crash leaves you in doubt about whether the commit
"took", but you get into byzantine-generals issues as soon as you try to
design that out. Consider the possibility that the commit went fine but
the network eats the reply packet saying so. Really, any application
that is constructed to reconnect and retry has got to have logic to test
whether the commit occurred, not just assume that it did or didn't.
(2PC is hardly a magic bullet for this, either.)
regards, tom lane
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: tgl@sss.pgh.pa.us, Kevin.Grittner@wicourts.gov, rlowe@pablowe.net
Subject: Re: BUG #6497: Error sent to client, but data written anyway
In-Reply-To: <29380.1330468930@sss.pgh.pa.us>
References: <E1S2PqI-0000DP-5q@wrigleys.postgresql.org> <23519.1330465109@sss.pgh.pa.us> <4F4CFA640200002500045CAC@gw.wicourts.gov> <29380.1330468930@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