Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> >> I am thinking of inventing an additional elog level, perhaps called
> >> COMMERR, to be used specifically for reports of client communication
> >> trouble. This could be treated the same as LOG as far as output to
> >> the server log goes, but we would hard-wire it to never be reported
> >> to the client (for fear of recursive failure).
>
> > Couldn't we just set whereToSendOutput to None to fix this, or is there
> > a sense that we may be able to send messages later.
>
> We might as well just do proc_exit() as do that: once you reset
> whereToSendOutput, you are effectively done talking to the client
> (because SELECT won't send results to the client anymore). The
> errors that libpq notices might or might not be hard failures, but
> I don't want to take the approach of changing global state in order
> to report them.
Oh, I thought whereToSendOutput only affected elog(). I now see it is
used in many places. Sure new log-only code is fine.
-- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026