From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Maciek Sakrejda <m(dot)sakrejda(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Protocol forced to V2 in low-memory conditions? |
Date: | 2013-09-10 10:35:15 |
Message-ID: | 20130910103515.GB1024477@alap2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2013-09-10 12:31:22 +0200, Magnus Hagander wrote:
> On Tue, Sep 10, 2013 at 5:29 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Maciek Sakrejda <m(dot)sakrejda(at)gmail(dot)com> writes:
> >> One of our customers seems to be running into exactly the issue
> >> hypothesized about by Tom here:
> >> http://www.postgresql.org/message-id/8040.1314403175@sss.pgh.pa.us
> >> Was the possibility of an inadvertent protocol downgrade addressed as part
> >> of that patch? I read through the thread, but it wasn't entirely clear.
> >
> > No, a quick look at report_fork_failure_to_client shows it still always
> > sends V2 protocol. We fixed some of the lesser issues discussed in that
> > thread, but I don't think we ever agreed how to deal with this one.
> >
> > I've been thinking of late that it might be time to retire libpq's
> > support for V2 protocol (other than in the specific context of the first
> > error message received while trying to make a connection). If we did
> > that, we'd remove the code path that thinks it should downgrade to V2
> > protocol, and thus fix this problem by removing code not adding more.
> >
> > However, that doesn't sound like a back-patchable solution, and also
> > it remains unclear whether non-libpq clients such as JDBC have an issue
> > with this.
>
> It's probably worth polling for that. I believe the jdbc driver at
> least has code for it, but I don't know if it's a requirement at this
> point.
Yes, it has code for it and I think it's still used pretty frequently to
circumvent prepared statement planning problems (misestimation,
indeterminate types). So I think we need convincing reasons to break
their usage.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2013-09-10 10:48:15 | Re: [bug fix] strerror() returns ??? in a UTF-8/C database with LC_MESSAGES=non-ASCII |
Previous Message | Robert Haas | 2013-09-10 10:33:14 | Re: Custom Plan node |