Re: Cryptic error message in low-memory conditions

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Daniel Farina <daniel(at)heroku(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Cryptic error message in low-memory conditions
Date: 2011-08-27 14:35:35
Message-ID: CABUevEz+RWDPxNUnBEjzM2=ShG5_8XBPKKjxt03O60keM9LcsQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Aug 27, 2011 at 01:59, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Daniel Farina <daniel(at)heroku(dot)com> writes:
>> Some Postgres servers will error out for a while with the following
>> error message:
>> "expected authentication request from server, but received c"
>> [ and this seems to be triggered by fork failures in the server ]
>
> <spock>Fascinating.</spock>

Agreed.

<snip>

> The reason for this is that that same bit of code supposes that any
> "E" response must mean that the postmaster didn't recognize
> NEGOTIATE_SSL_CODE.  It doesn't (and of course shouldn't) pay any
> attention to the actual textual error message.
>
> Now, seeing as how NEGOTIATE_SSL_CODE has been understood by every build
> since PG 7.0, I believe that this is dead code and we could remove it;
> it seems exceedingly unlikely that any modern build of libpq will ever
> be used to talk to a server that responds to that with "E".

What will be the result if you do use the modern libpq against that?

Anyway - that's 5 *unsupported* versions back. So even if people do
use that, I say they have to downgrade libpq as well ;)

+1 for removing it.

In fact, when do we reach the point that we can remove all the support
for the v2 protocol completely? (this would obviously not be as a
bugfix, but perhaps in 9.2)? Is there any particular reason we need to
support both anymore? At least in the client?

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2011-08-27 15:11:03 Re: Inputting relative datetimes
Previous Message Peter Eisentraut 2011-08-27 14:19:59 Re: [COMMITTERS] pgsql: Avoid locale dependency in expected output.