From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ryan Lowe <rlowe@pablowe.net>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6497: Error sent to client, but data written anyway
Date: Wed, 29 Feb 2012 13:56:04 -0500
Message-ID: <4729.1330541764@sss.pgh.pa.us> (raw)
In-Reply-To: <CADsh6kvZ4FhDBmeh0A=2RtYgtMtCxNNe9sb0hp=TJMccCX0XHg@mail.gmail.com>
References: <E1S2PqI-0000DP-5q@wrigleys.postgresql.org>
<23519.1330465109@sss.pgh.pa.us>
<4F4CFA640200002500045CAC@gw.wicourts.gov>
<29380.1330468930@sss.pgh.pa.us>
<CADsh6kvZ4FhDBmeh0A=2RtYgtMtCxNNe9sb0hp=TJMccCX0XHg@mail.gmail.com>
Ryan Lowe <rlowe@pablowe.net> writes:
> Thanks for all the responses, but I think I'm being unclear here. Let's
> walk through this case step-by-step. I start with a happy instance of
> Postgres:
This example does not have anything to do with the actual behavior of
Postgres, at least not on any system I know about. Killing the
postmaster does not cause child backends to die, and it certainly
doesn't cause them to commit open transactions and then die.
The system would be quite seriously broken if it acted as you describe.
I tested this, just to see if somebody had broken it when I wasn't
looking. The behavior that I see here is:
1. Killing the postmaster doesn't affect open transactions.
2. Killing the specific backend prevents the transaction from committing.
Which is what I expected.
> ... There has been talk in this thread
> that the application should simply always try and validate that its
> transactions have in fact failed, but that is not a feasible solution (for
> many reasons). Thoughts?
You might wish to believe that you can ignore the problem, but you can't.
No matter what Postgres does or doesn't do, external issues such as
network failures can create the problem of a transaction possibly being
committed while the client remains in doubt whether it happened or not.
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, rlowe@pablowe.net, Kevin.Grittner@wicourts.gov
Subject: Re: BUG #6497: Error sent to client, but data written anyway
In-Reply-To: <4729.1330541764@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> <CADsh6kvZ4FhDBmeh0A=2RtYgtMtCxNNe9sb0hp=TJMccCX0XHg@mail.gmail.com> <4729.1330541764@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