write_pipe_chunks patch messes up early error message output - Mailing list pgsql-hackers

From Tom Lane
Subject write_pipe_chunks patch messes up early error message output
Date
Msg-id 19283.1184549259@sss.pgh.pa.us
Whole thread Raw
Responses Re: write_pipe_chunks patch messes up early error message output
Re: write_pipe_chunks patch messes up early error message output
List pgsql-hackers
[ 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 by date:

Previous
From: Tom Lane
Date:
Subject: write_pipe_chunks patch messes up early error message output
Next
From: Tom Lane
Date:
Subject: Re: stored procedure stats in collector