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

Re: 8.2 "real-time" recovery

From: Dragos Valentin Moinescu <dragos(dot)moinescu(at)gmail(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: 8.2 "real-time" recovery
Date: 2010-08-26 19:02:21
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
thank you very much for your feedback.

I succeded in creating a warm standby server:

1. wal archive mirroring script (put it in a crontab to run):
rsync user(at)remote(dot)host:/from/ /to

2. recovery.conf contains only:

restore_command = 'sh /pgsql-data/ %f %p'

3. /pgsql-data/ contains:
while true; do
   if [ -f "/to/$1"] ; then
      cp $1 $2
# we have found the requested file - exit with 0 to tell postgres it
has the file
# postgres will request the next file in sequence after it processes
the current file
      exit 0
# else we are waiting for the file to become available: wait 30 seconds
      sleep 30
# after sleeping for 30 seconds, the loop will continue to test the next file

Thanx again.

On Wed, Aug 25, 2010 at 10:49 PM, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
> Dragos Valentin Moinescu <dragos(dot)moinescu(at)gmail(dot)com> wrote:
>> I did not use rsyncd. I used "rsync -avz user(at)host:/pgsqldata
>> /localpgdata". Will read about rsyncd
> You don't need to run the rsyncd service to get a daemon -- we use
> the remote shell technique, through ssh.  If you're using the ::
> syntax (versus :/), you are using a daemon.
> -Kevin

Best regards,
Dragos Moinescu

In response to


pgsql-admin by date

Next:From: Alvaro HerreraDate: 2010-08-26 19:07:57
Subject: Re: Unable to drop role
Previous:From: Tom LaneDate: 2010-08-26 18:59:43
Subject: Re: Unable to drop role

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