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: | AANLkTin-mgbFhfz3pSubjhu11vGYwnWwnZd-SAoOagMq@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
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):
#!/bin/sh
rsync user(at)remote(dot)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(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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2010-08-26 19:07:57 | Re: Unable to drop role |
Previous Message | Tom Lane | 2010-08-26 18:59:43 | Re: Unable to drop role |