Re: Synchronous Log Shipping Replication

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
Cc: Simon Riggs <simon(at)2ndQuadrant(dot)com>, Csaba Nagy <nagy(at)ecircle-ag(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, Markus Wanner <markus(at)bluegap(dot)ch>, ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Synchronous Log Shipping Replication
Date: 2008-09-12 20:12:05
Message-ID: 20080912201205.GN8854@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hannu Krosing escribió:
> On Fri, 2008-09-12 at 17:45 +0100, Simon Riggs wrote:
> > On Fri, 2008-09-12 at 17:11 +0200, Csaba Nagy wrote:
> >
> > > Why not have a design where the slave is in control for it's own data ?
> > > I mean the slave...
> >
> > The slave only exists because it is a copy of the master. If you try to
> > "startup" a slave without first having taken a copy, how would you
> > bootstrap the slave? With what? To what?
>
> As I understand it, Csaba meant that slave would "bootstrap itself" by
> connecting to master in some early phase of startup, requesting a
> physical filesystem level copy of data, then commencing the startup in
> Hot Standby mode.

Interesting ...

This doesn't seem all that difficult -- all you need is to start one
connection to get the WAL stream and save it somewhere; meanwhile a
second connection uses a combination of pg_file_read on master +
pg_file_write on slave to copy the data files over. When this step is
complete, recovery of the stored WAL commences.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ron Mayer 2008-09-12 20:32:13 Re: Proposed patch: make SQL interval-literal syntax work per spec
Previous Message Hannu Krosing 2008-09-12 20:06:21 Re: Synchronous Log Shipping Replication