write_pipe_chunks patch messes up early error message output

Поиск
Список
Период
Сортировка
[ ok, let's try this again --- apparently there's something in my mail
software that dislikes embedded nulls ]

I was experimenting with what happened if I made the pg_log directory
unwritable, and found out that this comes out on stderr:

<NUL><NUL><NUL>_<NUL><NUL>J3tFATAL:  could not create log file "pg_log/postgresql-2007-07-15_210716.log": Permission
denied

The problem is that elog.c thinks that the GUC variable Redirect_stderr
tells it whether to use the pipe chunk protocol on stderr, but in fact
that should *not* happen until we have successfully launched the syslogger
and repointed stderr to the pipe.

I suspect that error messages coming out of the syslogger itself (and
directed to the original stderr destination) will be similarly broken.

So that patch still needs work.  I think we probably need a flag
variable separate from the GUC variable to tell when to send using
the chunk protocol.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: write_pipe_chunks patch messes up early error message output
Следующее
От: Tom Lane
Дата:
Сообщение: Re: stored procedure stats in collector