pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedWarm standby terminate itself?
3+ messages / 2 participants
[nested] [flat]
* Warm standby terminate itself?
@ 2011-09-20 16:48 Rural Hunter <ruralhunter@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Rural Hunter @ 2011-09-20 16:48 UTC (permalink / raw)
To: pgsql-admin
Hi,
I set up an warm standby server which fetches WAL logs from a remote
server. It has been working very well. But today, I was editing the
restore script(which is set as the restore_command) with vi. Just right
after I saved the script, I noticed suddenly the standby server
terminated. I checked log and only found these:
scp: /dbbk/postgres/logarch/0000000100000079000000B3.gz: No such file or
directory #this is in my script and it unzip the WAL log if it exists
2011-09-20 23:56:50 CST FATAL: could not restore file
"0000000100000079000000B3" from archive: return code 65280
2011-09-20 23:56:51 CST LOG: startup process (PID 2153) exited with
exit code 1
2011-09-20 23:56:51 CST LOG: terminating any other active server processes
I believe the script doesn't exit with 0 for any error(and it has been
working smoothly without any modification after server restart). After I
started the server, it just restored passing the file without problem
and it can live with file "No such file" warning because the master
server hasn't generated the log yet. I have no idea why the restore
failed. But even the restore fails, why it lead to a server crash(looks
like so)?
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Warm standby terminate itself?
@ 2011-09-20 17:31 Kevin Grittner <Kevin.Grittner@wicourts.gov>
parent: Rural Hunter <ruralhunter@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Grittner @ 2011-09-20 17:31 UTC (permalink / raw)
To: Rural Hunter <ruralhunter@gmail.com>; pgsql-admin
Rural Hunter <ruralhunter@gmail.com> wrote:
> I set up an warm standby server which fetches WAL logs from a
> remote server. It has been working very well. But today, I was
> editing the restore script(which is set as the restore_command)
> with vi. Just right after I saved the script, I noticed suddenly
> the standby server terminated.
Updating a recovery script while it is executing is a problem. I
tend to update a copy of the script, stop the warm standby, mv the
copy into place, and start the warm standby. You can do that
without kicking it out of recovery status.
-Kevin
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Warm standby terminate itself?
@ 2011-09-21 01:23 Rural Hunter <ruralhunter@gmail.com>
parent: Kevin Grittner <Kevin.Grittner@wicourts.gov>
0 siblings, 0 replies; 3+ messages in thread
From: Rural Hunter @ 2011-09-21 01:23 UTC (permalink / raw)
To: Kevin Grittner <kevin.grittner@wicourts.gov>; +Cc: pgsql-admin
Got it. thanks.
于2011年9月21日 1:31:09,Kevin Grittner写到:
> Rural Hunter<ruralhunter@gmail.com> wrote:
>
>> I set up an warm standby server which fetches WAL logs from a
>> remote server. It has been working very well. But today, I was
>> editing the restore script(which is set as the restore_command)
>> with vi. Just right after I saved the script, I noticed suddenly
>> the standby server terminated.
>
> Updating a recovery script while it is executing is a problem. I
> tend to update a copy of the script, stop the warm standby, mv the
> copy into place, and start the warm standby. You can do that
> without kicking it out of recovery status.
>
> -Kevin
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2011-09-21 01:23 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-09-20 16:48 Warm standby terminate itself? Rural Hunter <ruralhunter@gmail.com>
2011-09-20 17:31 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2011-09-21 01:23 ` Rural Hunter <ruralhunter@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox