From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Greg Stark <stark(at)mit(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Is it time to kill support for very old servers? |
Date: | 2016-10-07 16:06:17 |
Message-ID: | 12021.1475856377@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Fri, Oct 7, 2016 at 11:34 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Greg Stark <stark(at)mit(dot)edu> writes:
>>> For another there may be binary-only applications or drivers out there
>>> that are using V2 for whatever reason.
>> The problem with letting it just sit there is that we're not, in fact,
>> testing it. If we take the above argument seriously then we should
>> provide some way to configure libpq to prefer V2 and run regression
>> tests in that mode. Otherwise, if/when we break it, we'll never know it
>> till we get field reports.
> I agree with that. I think it would be fine to keep V2 support if
> somebody wants to do the work to let us have adequate test coverage,
> but if nobody volunteers I think we might as well rip it out. I don't
> particularly enjoy committing things only to be told that they've
> broken something I can't test without unreasonable effort.
When I wrote the above I was thinking of an essentially user-facing
libpq feature, similar to the one JDBC has, to force use of V2 protocol.
But actually, for testing purposes, I don't think that's what we want.
Any such feature would fail to exercise libpq's logic for falling back
from V3 to V2 when it connects to an old server, which is surely something
we'd like to test without actually having a pre-7.4 server at hand.
So what I'm thinking is it'd be sufficient to do something like
this in pqcomm.h:
+#ifndef FORCE_OLD_PROTOCOL
#define PG_PROTOCOL_LATEST PG_PROTOCOL(3,0)
+#else /* make like a pre-7.4 server for testing purposes */
+#define PG_PROTOCOL_LATEST PG_PROTOCOL(2,0)
+#endif
which would cause the server to reject 3.0 requests just as if it were
ancient. Then we could test with that #define, maybe have a buildfarm
critter doing it. (This might break pqmq.c though, so we might need
to work slightly harder than this.)
Also, I realized while perusing this that the server still has support
for protocol 1.0 (!). That's *definitely* dead code. There's not much
of it, but still, I'd rather rip it out than continue to pretend it's
supported.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-10-07 16:19:23 | Re: Radix tree for character conversion |
Previous Message | Jeff Janes | 2016-10-07 16:04:24 | Re: Question about pg_control usage |