Re: write_pipe_chunks patch messes up early error message output

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: write_pipe_chunks patch messes up early error message output
Date: 2007-07-19 16:02:20
Message-ID: 469F8B0C.105@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>
>> Or, looking at it another way, why would we ever want the syslogger to
>> use the chunking protocol at all?
>>
>
> Ah, I misunderstood you. Yeah, I think you are right: if we are
> special-casing the syslogger process anyway, then it need only have
> these two behaviors:
>
> not redirection_done: write to own stderr (not chunked) and directly to
> file
>
> redirection_done: write directly to file
>
> One thing to watch out for is infinite recursion if the write-to-file
> gets an error. I don't remember if we have a defense against that
> in there now, but we probably should.
>
>
>

I think we do. write_syslogger_file says:

/* can't use ereport here because of possible recursion */

Anyway, I think the attached patch will do what we need.

cheers

andrew

Attachment Content-Type Size
chunkfix.patch text/x-patch 5.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-07-19 17:34:16 Re: write_pipe_chunks patch messes up early error message output
Previous Message Andrew Dunstan 2007-07-19 15:37:57 Re: Why so many out-of-disk-space failures on buildfarm machines?