Re: archive_command debugging

Поиск
Список
Период
Сортировка
От Christoph Moench-Tegeder
Тема Re: archive_command debugging
Дата
Msg-id ZOYty0Mtkx2ZqX-d@elch.exwg.net
обсуждение исходный текст
Ответ на archive_command debugging  (Nick Renders <postgres@arcict.com>)
Список pgsql-general
## Nick Renders (postgres@arcict.com):

> I was wondering if anyone had any good tips for "debugging" the
> archive_command in the postgresql.conf.

For starters, you get rather noisy logging when that command fails
(plus all the output from the command itself), so check your postgres
logfile first. Also, you get some additional debug logging at level
DEBUG3.
Then archive_command basically inherits it's environment and user id
from the archiver process, so you could check that process' proc entries.
Third, archive_command is executed via system() (after template
processing), so you're free to do... quite a lot in there (just
don't mess with the exit status). It might be more convenient to
use some shell wrapper around your final archive command and have
that wrapper do all the logging etc. you might want.

And a final tip: do not rely on the environment, always use full
paths, and if you ever might have whitespace or other "funny
characters" in some path/file name (or always, just to be safe)
make sure you get your quoting right.

Regasrds,
Christoph

-- 
Spare Space



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

Предыдущее
От: Nick Renders
Дата:
Сообщение: archive_command debugging
Следующее
От: Hellen Jiang
Дата:
Сообщение: Read only user permission