Re: Patch for fail-back without fresh backup

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Samrat Revagade <revagade(dot)samrat(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch for fail-back without fresh backup
Date: 2013-11-21 22:40:36
Message-ID: CAMkU=1wW0-vz1KJMKRUbN6ctJxHjq5vG2SkqSDa7j0z9qq3_-w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 21, 2013 at 12:31 PM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com>wrote:

> Bruce Momjian escribió:
> > On Thu, Oct 24, 2013 at 11:14:14PM +0300, Heikki Linnakangas wrote:
> > > On 24.10.2013 23:07, Josh Berkus wrote:
>
> > > >What kind of overhead are we talking about here?
> > >
> > > One extra WAL record whenever a hint bit is set on a page, for the
> > > first time after a checkpoint. In other words, a WAL record needs to
> > > be written in the same circumstances as with page checksums, but the
> > > WAL records are much smaller as they don't need to contain a full
> > > page image, just the block number of the changed block.
> > >
> > > Or maybe we'll write the full page image after all, like with page
> > > checksums, just without calculating the checksums. It might be
> > > tricky to skip the full-page image, because then a subsequent change
> > > of the page (which isn't just a hint-bit update) needs to somehow
> > > know it needs to take a full page image even though a WAL record for
> > > it was already written.
> >
> > Sorry to be replying late to this, but while I am not worried about the
> > additional WAL volume, does this change require the transaction to now
> > wait for a WAL sync to disk before continuing?
>
> I don't think so. There's extra WAL written, but there's no
> flush-and-wait until end of transaction (as has always been).
>

But if the transaction would not have otherwise generated WAL (i.e. a
select that did not have to do any HOT pruning, or an update with zero rows
matching the where condition), doesn't it now have to flush and wait when
it would otherwise not?

Cheers,

Jeff

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-11-21 22:43:34 Re: Patch for fail-back without fresh backup
Previous Message Andres Freund 2013-11-21 22:16:31 Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist