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