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

Re: Core team statement on replication in PostgreSQL

From: Hannu Krosing <hannu(at)krosing(dot)net>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Smith <gsmith(at)gregsmith(dot)com>,"Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>,Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org,Bruce Momjian <bruce(at)momjian(dot)us>, David Fetter <david(at)fetter(dot)org>,Josh Berkus <josh(at)agliodbs(dot)com>, Marko Kreen <markokr(at)gmail(dot)com>
Subject: Re: Core team statement on replication in PostgreSQL
Date: 2008-06-01 20:42:11
Message-ID: 1212352931.18365.17.camel@huvostro (view raw or flat)
Thread:
Lists: pgsql-advocacypgsql-hackers
On Fri, 2008-05-30 at 15:16 -0400, Robert Treat wrote:
> On Friday 30 May 2008 01:10:20 Tom Lane wrote:
> > Greg Smith <gsmith(at)gregsmith(dot)com> writes:
> > > I fully accept that it may be the case that it doesn't make technical
> > > sense to tackle them in any order besides sync->read-only slaves because
> > > of dependencies in the implementation between the two.
> >
> > Well, it's certainly not been my intention to suggest that no one should
> > start work on read-only-slaves before we finish the other part.  The
> > point is that I expect the log shipping issues will be done first
> > because they're easier, and it would be pointless to not release that
> > feature if we had it.
> >
> > But since you mention it: one of the plausible answers for fixing the
> > vacuum problem for read-only slaves is to have the slaves push an xmin
> > back upstream to the master to prevent premature vacuuming.  The current
> > design of pg_standby is utterly incapable of handling that requirement.
> > So there might be an implementation dependency there, depending on how
> > we want to solve that problem.
> >
> 
> Sure, but whose to say that after synchronous wal shipping is "finished" it 
> wont need a serious re-write due to new needs from the hot standby feature. I 
> think going either way carries some risk. 

The simplest form of synchronous wal shipping would not even need
postgresql running on slave, just a small daemon which reports when wal
blocks are a) received and b) synced to disk. 

This setup would just guarantee "no data loss on single machine
failure". form there on you could add various features, including
support for both switchover and failover, async replication to multiple
slaves, etc.

the only thing that needs anything additional from slave wal-receiving
daemon is when you want the kind of wal-sync which would guarantee that
read-only query on slave issued after commit returns from master sees
latest data. for this kinds of guarantees you need at least feedback
about wal-replay, but possibly also shared transaction numbers and
shared snapshots, to be sure that OLTP type queries see the latest and
OLAP queries are not denied seeing VACUUMED on master.

--------------
Hannu



In response to

Responses

pgsql-hackers by date

Next:From: Hannu KrosingDate: 2008-06-01 20:42:29
Subject: Re: Core team statement on replication in PostgreSQL
Previous:From: James MansionDate: 2008-06-01 20:16:51
Subject: Re: Core team statement on replication in PostgreSQL

pgsql-advocacy by date

Next:From: Hannu KrosingDate: 2008-06-01 20:42:29
Subject: Re: Core team statement on replication in PostgreSQL
Previous:From: James MansionDate: 2008-06-01 20:16:51
Subject: Re: Core team statement on replication in PostgreSQL

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