Re: handling unconvertible error messages - Mailing list pgsql-hackers

From Tom Lane
Subject Re: handling unconvertible error messages
Date
Msg-id 9044.1470335152@sss.pgh.pa.us
Whole thread Raw
In response to Re: handling unconvertible error messages  (Victor Wagner <vitus@wagner.pp.ru>)
Responses Re: handling unconvertible error messages  (Victor Wagner <vitus@wagner.pp.ru>)
List pgsql-hackers
Victor Wagner <vitus@wagner.pp.ru> writes:
> On Thu, 04 Aug 2016 09:42:10 -0400
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Yeah.  I'm inclined to think that we should reset the message locale
>> to C as soon as we've forked away from the postmaster, and leave it
>> that way until we've absorbed settings from the startup packet.

> Really, if this response is sent after backend has been forked, problem
> probably can be easily fixed better way - StartupMessage contain
> information about desired client encoding, so this information just
> should be processed earlier than any other information from this
> message, which can cause errors (such as database name).

I think that's wishful thinking.  There will *always* be errors that
come out before we can examine the contents of the startup message.
Moreover, until we've done authentication, we should be very wary of
applying client-specified settings at all: they might be malicious.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Claudio Freire
Date:
Subject: Re: Heap WARM Tuples - Design Draft
Next
From: Claudio Freire
Date:
Subject: Re: Heap WARM Tuples - Design Draft