Re: Fwd: Default pg_autovacuum config glitches

Поиск
Список
Период
Сортировка
От Matthew T. O'Connor
Тема Re: Fwd: Default pg_autovacuum config glitches
Дата
Msg-id 4064F47F.2070806@zeut.net
обсуждение исходный текст
Ответ на Re: Fwd: Default pg_autovacuum config glitches  (Bruno Wolff III <bruno@wolff.to>)
Ответы Re: Fwd: Default pg_autovacuum config glitches  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-bugs
Bruno Wolff III wrote:

>On Thu, Mar 25, 2004 at 16:08:49 +0100,
>  Martin Pitt <martin@piware.de> wrote:
>
>
>>A while ago we received the bug report below against pg_autovacuum.
>>Since it runs as a daemon, it should detach from its controlling
>>terminal by executing sth like
>>
>>        int nullfd = open("/dev/null", O_RDWR);
>>        dup2(nullfd, 0);
>>        dup2(nullfd, 1);
>>        dup2(nullfd, 2);
>>        if (nullfd != 0 && nullfd != 1 && nullfd != 2)
>>                close(nullfd);
>>
>>(taken from syslog-ng which does it properly).
>>
>>
>
>That doesn't look like a good idea. This will prevent any logging to
>stdout or stderr.
>
>If you don't want that ability you can redirect the stdin, stdout and
>stderr yourself.
>

I have stayed quiet about this since I wanted to hear what others
thought of the above suggest fix.  I took the detach code straight from
the postmaster daemonize function.  Perhaps I didn't do something right
but that was the example I followed.  Thoughts?  Anyone else had this
problem?

BTW, I think this will be moon in 7.5 since it looks like pg_autovaccum
will be launched by the postmaster.

Matthew

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

Предыдущее
От: "PostgreSQL Bugs List"
Дата:
Сообщение: BUG #1117: Time calculation from epoch is 12 hours out
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #1117: Time calculation from epoch is 12 hours out