Re: [HACKERS] Shutting down a warm standby database in 8.2beta3
От | Gregory Stark |
---|---|
Тема | Re: [HACKERS] Shutting down a warm standby database in 8.2beta3 |
Дата | |
Msg-id | 87u00xuxkt.fsf@enterprisedb.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Shutting down a warm standby database in 8.2beta3 (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-general |
"Tom Lane" <tgl@sss.pgh.pa.us> writes: > Gregory Stark <stark@enterprisedb.com> writes: >> Sure, but it might be getting delivered to, say, your "sleep" command. You >> haven't checked the return value of sleep to handle any errors that may occur. >> As it stands you have to check for errors from every single command executed >> by your script. > > The expectation is that something like SIGINT or SIGQUIT would be > delivered to both the sleep command and the shell process running the > script. So the shell should fail anyway. (Of course, a nontrivial > archive or recovery script had better be checking for failures at each > step, but this is not very relevant to the immediate problem.) Hm, I tried to test that before I sent that. But I guess my test was faulty since I was really testing what process the terminal handling delivered the signal to: $ cat /tmp/test.sh #!/bin/sh echo before sleep 5 || echo sleep failed echo after $ sh /tmp/test.sh ; echo $? before ^\ /tmp/test.sh: line 4: 23407 Quit sleep 5 sleep failed after 0 -- Gregory Stark EnterpriseDB http://www.enterprisedb.com
В списке pgsql-general по дате отправления: