From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@2ndquadrant.com>
Cc: tarvip@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #8059: sequence crash recovery is not working properly
Date: Fri, 12 Apr 2013 10:47:52 -0400
Message-ID: <17168.1365778072@sss.pgh.pa.us> (raw)
In-Reply-To: <20130412140416.GF5766@alap2.anarazel.de>
References: <E1UQd4H-0000TP-6T@wrigleys.postgresql.org>
<20130412140416.GF5766@alap2.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Andres Freund <andres@2ndquadrant.com> writes:
> Thats caused by the fact that you didn't do anything that forces a WAL
> flush since you didn't do any inserts or such. If you would do any
> DML in the nextval() calling transaction this shouldn't happen (unless
> you use synchronous_commit=off).
> Now, there's a legitimate argument to be made that returning the
> sequence value to the user kinda persists it. On the other hand, at
> least in the first example you haven't even committed the transaction so
> there's nothing that could flush the transaction unless we we would
> *always* flush nextval() immediately if needs to get new values which
> doesn't seem reasonable.
I believe we've gone around on this before and decided to leave it
as-is. The thinking is that any realistic use-case would involve
storing the nextval result into some table somewhere, so that additional
WAL and a commit record would be generated.
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 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, andres@2ndquadrant.com, tarvip@gmail.com
Subject: Re: BUG #8059: sequence crash recovery is not working properly
In-Reply-To: <17168.1365778072@sss.pgh.pa.us>
References: <E1UQd4H-0000TP-6T@wrigleys.postgresql.org> <20130412140416.GF5766@alap2.anarazel.de> <17168.1365778072@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