pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@2ndquadrant.com>
To: Tarvi Pillessaar <tarvip@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #8059: sequence crash recovery is not working properly
Date: Fri, 12 Apr 2013 19:07:54 +0200
Message-ID: <20130412170754.GA6209@awork2.anarazel.de> (raw)
In-Reply-To: <51683E0F.60001@gmail.com>
References: <E1UQd4H-0000TP-6T@wrigleys.postgresql.org>
	<20130412140416.GF5766@alap2.anarazel.de>
	<51683E0F.60001@gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 2013-04-12 20:02:07 +0300, Tarvi Pillessaar wrote:
> On 12.04.2013 17:04, Andres Freund wrote:
> >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.
> Yes, i know that i haven't commited anything and also i agree that flushing
> always is not reasonable.
> I'm not sure that i understand all the details in sequence.c, but there
> seems to be some sort of cache used for sequences, so instead of flushing
> always maybe flush should only happen if next batch of values are written to
> cache.

Flushing everytime the cache is used up will have a far too high
overhead. Consider bulk loading new data into a table. If we would flush
wal every 32 new rows that would be disastrous from a performance
perspective.

Greetings,

Andres Freund

-- 
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (6+ messages)

Message-ID: <20130412170754.GA6209@awork2.anarazel.de>
Permalink:  ../20130412170754.GA6209@awork2.anarazel.de/
Also on:    postgresql.org/message-id/20130412170754.GA6209@awork2.anarazel.de

 · 

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 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: andres@2ndquadrant.com, tarvip@gmail.com
  Subject: Re: BUG #8059: sequence crash recovery is not working properly
  In-Reply-To: <20130412170754.GA6209@awork2.anarazel.de>
  References: <E1UQd4H-0000TP-6T@wrigleys.postgresql.org> <20130412140416.GF5766@alap2.anarazel.de> <51683E0F.60001@gmail.com> <20130412170754.GA6209@awork2.anarazel.de>

* 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