Re: Replication using WAL files

From: "Josh Harrison" <joshques(at)gmail(dot)com>
To: "Alexander Staubo" <alex(at)purefiction(dot)net>
Cc: "Postgresql General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Replication using WAL files
Date: 2007-12-07 17:49:54
Message-ID: 8d89ea1d0712070949g5571a929k786604df4f19ffd7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
>
>
> On 12/7/07, Josh Harrison < joshques(at)gmail(dot)com> wrote:
> > > I have 2 servers on which I need to have data replicated. The master
> > server
> > > should serve for read/write queries and the 2nd server is used mainly
> > for
> > > research queries(read-only queries) and so it doesn't have to be
> > up-to-date.
> > ...
> > > Is it possible to implement this thro' WAL shipping?
> >
> > No. At the moment [1] the WAL shipping system does not permit you to
> > query the slave. There are a few options:
> >
> >
> > http://pgfoundry.org/search/?type_of_search=soft&words=replication&Search=Search
> >
> > As well as this:
> >
> > http://bucardo.org/
> >
> > [1] But someone is working on this for 8.4. Don't hold your breath,
> > though.
> >
> >
> Thanks for the info. Just to clarify, So at the moment for WAL shipping to
> work the 2nd server should only be a stand-by server and not a slave(cannot
> be queried) ?
> In your experience, which other replication system (slony,pgpool etc) is
> better suited for my requirement?
>
> Thanks again
> josh
>
>
Hi,
I read all the documentations and got a bit confused.
1. I have a primary server which archives the WAL files to the secondary
servers's directory(some directory).
2. The recovery.conf in the secondary server is set to copy these files
from this directory.
3. I take a base backup and feed it to the secondary server and start the
secondary server.
4. The secondary server now contains all the base backuped data.
5. I set up a trigger (as in this demo
http://archives.postgresql.org/sydpug/2006-10/msg00001.php)<http://archives.postgresql.org/sydpug/2006-10/msg00001.php>
I created/inserted some table/data in the primary server, 'touch' trigger
in sec server and the archived files are reflected in the sec server's
database now and the sec database is up (recovery.conf becomes recovery.done)
and I can query the secondary as normal.

My question is that will any future changes in the primary server gets
reflected in the secondary server or is it just a 1-time show? If no, is it
possible to have a set-up like that (secondary server getting asychronous
updates from master thro' WAL files......I guess "Hot standby using WAL
files") ?

Sorry if my question sounds silly.
Thanks for all your help
josh

My question is

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert Treat 2007-12-07 17:53:45 Re: Re-partitioning huge schema
Previous Message Martijn van Oosterhout 2007-12-07 17:44:41 Re: Improving the timing of a query