public inbox for [email protected]
help / color / mirror / Atom feedFrom: Sebastien FLAESCH <[email protected]>
To: Tom Lane <[email protected]>
Cc: [email protected]
Cc: [email protected]
Subject: Re: Details about libpq cross-version compatibility
Date: Fri, 14 Sep 2012 11:43:43 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
Hello Tom,
First, we must distinguish (1) cross-version compatibility between PostgreSQL
client and server, from (2) compatibility between the libpq headers used to
compile programs and the client bin library used at runtime...
Regarding (1), I believe this is properly managed, based on the C/S protocol
checking, if I understand correctly. For ex, a 9.2 client can connect to a 8.4
server... right?
Regarding (2), if this is a feature of PostgreSQL libpq, of course it makes no
sense to do release version checking in the lib, as I suggested.
And in fact, this is already enforced by the usage of Linux-style library
version convention (libpq.so.5), if the OS supports this...
$ ldd -r dbmpgs92x.so
...
...
libpq.so.5 => /opt3/dbs/pgs/9.2.0/lib/libpq.so.5 (0xb77cc000)
Here you MUST have libpq.so.5 installed.
(Just don't forget to increment the 5 the day an incompatibility is introduced)
Idea: Maybe a similar internal checking could still be done by libpq, for the
systems that do not use the Linux-style shared lib naming convention?
Should be based on an internal number, (like 5), of course not the release number.
You never know what tricky things people might do to make it work...
cp libpq.so.5 libpq.so.4
=> run program linked with libpq.so.4
Further, some minimal testing should be done... for ex, run the regression tests
compiled with the 9.0 headers, but using a 9.1 client environment, and for (1),
connecting to a 9.2 server and have another config using a 8.4 server, or a
server using an older protocol...
Then, regarding the doc, both (1) and (2) should be clearly documented.
Best regards,
Seb
On 09/14/2012 12:25 AM, Tom Lane wrote:
> Sebastien FLAESCH<[email protected]> writes:
>> If a future major version (for ex 9.3) implements a new strategic feature
>> that makes libpq headers incompatible with prior versions, what shall we
>> do with our convention? Shall we ship 9.x (where 0<=x<=2) drivers and 9.3+
>> drivers? What if a next major version implements again another feature
>> that makes headers incompatible again?
>
> We've never done that AFAIR. When and if it happens, that would be the
> time to deal with it.
>
>> I think I am asking for is an official statement that clearly says that
>> libpq headers are only compatible for a given set of minor versions, like
>> (8.4.1, 8.4.2, 8.4.3, ...) or (9.2.1, 9.2.2, ...)
>
>> I believe also that the libpq library should automatically check for
>> compatiblity, based on PG_MAJORVERSION definition in pg_config.h ...
>
> It seems highly undesirable to me that we should intentionally break
> cross-version compatibility, which is what you seem to be proposing.
>
> regards, tom lane
>
view thread (9+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Details about libpq cross-version compatibility
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox