Re: 8.2 "real-time" recovery - Mailing list pgsql-admin

From Dragos Valentin Moinescu
Subject Re: 8.2 "real-time" recovery
Date
Msg-id AANLkTin-mgbFhfz3pSubjhu11vGYwnWwnZd-SAoOagMq@mail.gmail.com
Whole thread Raw
In response to Re: 8.2 "real-time" recovery  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: 8.2 "real-time" recovery  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List 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):
#!/bin/sh
rsync user@remote.host:/from/ /to

2. recovery.conf contains only:

restore_command = 'sh /pgsql-data/restore-postgres.sh %f %p'

3. /pgsql-data/restore-postgres.sh contains:
#!/bin/sh
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
# 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
   fi
done

Thanx again.

On Wed, Aug 25, 2010 at 10:49 PM, Kevin Grittner
<Kevin.Grittner@wicourts.gov> wrote:
> Dragos Valentin Moinescu <dragos.moinescu@gmail.com> wrote:
>
>> I did not use rsyncd. I used "rsync -avz user@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

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Unable to drop role
Next
From: Alvaro Herrera
Date:
Subject: Re: Unable to drop role