Re: BUG #10675: alter database set tablespace and unlogged table - Mailing list pgsql-bugs

From Andres Freund
Subject Re: BUG #10675: alter database set tablespace and unlogged table
Date
Msg-id 20141016042625.GJ7242@alap3.anarazel.de
Whole thread Raw
In response to Re: BUG #10675: alter database set tablespace and unlogged table  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: BUG #10675: alter database set tablespace and unlogged table  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-bugs
On 2014-10-16 04:08:50 +0100, Simon Riggs wrote:
> On 18 June 2014 14:45, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > Andres Freund <andres@2ndquadrant.com> writes:
> >> On 2014-06-18 16:15:47 +0530, Pavan Deolasee wrote:
> >>> But I wonder if not flushing dirty buffers
> >>> of unlogged tables at a checkpoint is a bad idea anyways. User might expect
> >>> that the unlogged tables to sustain server crash or unclean shutdown if
> >>> there had been no writes after successful manual checkpoint(s).
> >
> >> They'll get reset at unlcean startup anyway. Independent of having been
> >> touched or not.
> >
> > I'm with Pavan on this one: it's *not* a good thing that manually issued
> > checkpoints skip unlogged tables.  That's surprising, possibly dangerous,
> > and no case whatsoever has been made that anyone sees it as an important
> > performance benefit.
> >
> > I trust that a shutdown checkpoint, at least, would write such pages?
> > If so, I'd expect that a manual checkpoint would do it too.  Maybe
> > I'm checkpointing because I want to be sure that the shutdown will be
> > quick so I can do a minor release update with minimal downtime.
>
> I think manual checkpoints should flush everything.
>
> This is a valid use case.
>
> What other use case is there for a manual checkpoint?

There's people using frequent manual checkpoints to keep performance
predictable. Unfortunately that actually can improve jitter quite
measurably.

If we want to change this, fine, but we shouldn't sneak it into the back
branches, together with a correctness fix

Greetings,

Andres Freund

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

pgsql-bugs by date:

Previous
From: Simon Riggs
Date:
Subject: Re: BUG #10675: alter database set tablespace and unlogged table
Next
From: Joe Van Dyk
Date:
Subject: Re: BUG #11033: 'pg_dump -a' much slower than 'pg_dump'