Skip site navigation (1) Skip section navigation (2)

Re: cheaper snapshots

From: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Ants Aasma <ants(dot)aasma(at)eesti(dot)ee>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: cheaper snapshots
Date: 2011-07-29 14:31:03
Message-ID: 1311949863.3117.3571.camel@hvost (view raw or flat)
Thread:
Lists: pgsql-hackers
On Fri, 2011-07-29 at 10:23 -0400, Robert Haas wrote:
> On Fri, Jul 29, 2011 at 10:20 AM, Hannu Krosing <hannu(at)2ndquadrant(dot)com> wrote:
> >> An additional point to think about: if we were willing to insist on
> >> streaming replication, we could send the commit sequence numbers via a
> >> side channel rather than writing them to WAL, which would be a lot
> >> cheaper.
> >
> > Why do you think that side channel is cheaper than main WAL ?
> 
> You don't have to flush it to disk, 

You can probably write the "i became visible" WAL record without forcing
a flush and still get the same visibility order.

> and you can use some other lock
> that isn't as highly contended as WALInsertLock to synchronize it.

but you will need to synchronise it with WAL replay on slave anyway. It
seems easiest to just insert it in the WAL stream and be done with it. 

> >> That might even be a reasonable thing to do, because if
> >> you're doing log shipping, this is all going to be super-not-real-time
> >> anyway.
> >
> > But perhaps you still may want to preserve visibility order to be able
> > to do PITR to exact transaction "commit", no ?
> 
> Maybe.  In practice, I suspect most people won't be willing to pay the
> price a feature like this would exact.

Unless we find some really bad problems with different visibility orders
on master and slave(s) you are probably right.

-- 
-------
Hannu Krosing
PostgreSQL Infinite Scalability and Performance Consultant
PG Admin Book: http://www.2ndQuadrant.com/books/


In response to

pgsql-hackers by date

Next:From: jordaniDate: 2011-07-29 15:04:52
Subject: Incremental checkopints
Previous:From: Robert HaasDate: 2011-07-29 14:23:27
Subject: Re: cheaper snapshots

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group