From: | Ray Stell <stellr(at)cns(dot)vt(dot)edu> |
---|---|
To: | Yauheni Labko <yyl(at)chappy(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: standby waiting for what? |
Date: | 2009-03-05 13:55:56 |
Message-ID: | 20090305135556.GA9900@cns.vt.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Wed, Mar 04, 2009 at 05:05:19PM -0500, Yauheni Labko wrote:
> No. %f is the WAL filename which is needed by the server to start recovery.
my recovery command is:
restore_command='/usr/local/pgsql/bin/pg_standby /data/pgsql/wals/alerts_oamp %f %p %r >> /home/postgresql/log/alerts_oamp/recovery.log'
the process that is running is, from the ps command:
sh -c /usr/local/pgsql/bin/pg_standby /data/pgsql/wals/alerts_oamp
+00000002000000000000001C.00512178.backup pg_xlog/RECOVERYHISTORY 000000000000000000000000 >>
+/home/postgresql/log/alerts_oamp/recovery.log
there are 4 args to pg_standby:
1. /data/pgsql/wals/alerts_oamp the archive dir
2. 00000002000000000000001C.00512178.backup = %f
3. pg_xlog/RECOVERYHISTORY = %p
4. 000000000000000000000000 = %r
Looks like %f to me. Right? So, how could it get set to a funky value like that?
> 00000002000000000000001C.00512178.backup will give you start and end of WAL
> segment, the WAL filename containing this segment and your label to identify
> where it might be. That's why I asked you about your backup.
I don't follow you here. How did you know that the string,
00000002000000000000001C.00512178.backup will provide the start and
end of WAL segment? Please explain how you determined this?
I suspect the standy is waiting for a WAL named 00000002000000000000001C
and that file exists on the standby:
ls -l /data/pgsql/wals/alerts_oamp/
total 114828
-rw------- 1 postgresql postgresql 16777216 Mar 4 11:28 00000002000000000000001A
-rw------- 1 postgresql postgresql 16777216 Mar 4 11:29 00000002000000000000001B
-rw------- 1 postgresql postgresql 16777216 Mar 4 12:24 00000002000000000000001C
-rw------- 1 postgresql postgresql 16777216 Mar 4 12:25 00000002000000000000001D
-rw------- 1 postgresql postgresql 16777216 Mar 4 12:26 00000002000000000000001E
-rw------- 1 postgresql postgresql 16777216 Mar 4 14:45 00000002000000000000001F
-rw------- 1 postgresql postgresql 16777216 Mar 4 14:45 000000020000000000000020
but, somehow I confused pg and the name being passed to pg_standby is wrong.
I have a suspicion that if I mv /data/pgsql/wals/alerts_oamp/00000002000000000000001C
to /data/pgsql/wals/alerts_oamp/00000002000000000000001C.00512178.backup that the
recovery would pick up. If there is no understanding to be gained here, I might do
that and then throw this out with the bath water and start over.
> What is the archive_command for primary server?
the archive command is working fine as you see above. It just runs a local
script that does an rsync of the pg_xlog wal file over to the standby.
I agree with you, something about the backup must have caused this
confusion. I'm just rsyncing the cluster dir from the primary to the
standby, removing pg_xlogs files, and setting recovery.conf. Is there
a better way?
From | Date | Subject | |
---|---|---|---|
Next Message | Yauheni Labko | 2009-03-05 15:04:44 | Re: standby waiting for what? |
Previous Message | Simon Riggs | 2009-03-05 09:11:39 | Re: Postgressql backup/restore question |