Re: unable to fail over to warm standby server

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: unable to fail over to warm standby server
Дата
Msg-id 603c8f071001291607u234cad88mcf5a7cab69cf78b7@mail.gmail.com
обсуждение исходный текст
Ответ на Re: unable to fail over to warm standby server  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Ответы Re: unable to fail over to warm standby server  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Fri, Jan 29, 2010 at 3:32 PM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> Actually, I think there's a tiny harmless bug in the server too. When it
> prints the error message:
>
> 2010-01-18 21:08:31 UTC ()FATAL: =A0could not restore file
> "0000000200003C82000000D8" from archive: return code 65280
>
> That return code is not the return code that came from the
> restore_command. Ie if you do exit(200) in the command, you won't see
> "return code 200", but you see the return value from system(). system()
> doesn't return the exit code directly, but an encoded integer that
> includes the exit code. You're supposed to call WEXITSTATUS() on it to
> get the real return code.
>
> That only affects the error message and is harmless otherwise, but I
> thought I'd mention it. I'll fix it, unless someone wants to argue that
> its more useful to print the raw return value of system(), because it
> might contain more information like which signal killed the process,
> that you could extract from the cryptic error code using e.g WTERMSIG()
> macro.

An "if" statement would seem to be in order, so that you can print out
either the exit code or the signal number as appropriate.

...Robert

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: unable to fail over to warm standby server
Следующее
От: Tom Lane
Дата:
Сообщение: Re: unable to fail over to warm standby server