From: | Sebastien FLAESCH <sf(at)4js(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | hlinnaka(at)iki(dot)fi, pgsql-docs(at)postgresql(dot)org |
Subject: | Re: Details about libpq cross-version compatibility |
Date: | 2012-09-14 09:43:43 |
Message-ID: | 5052FC4F.6060909@4js.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
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<sf(at)4js(dot)com> 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
>
From | Date | Subject | |
---|---|---|---|
Next Message | barrybrown | 2012-09-16 09:01:13 | BUG #7543: Invalid table alias: DELETE FROM table * |
Previous Message | Tom Lane | 2012-09-13 22:25:07 | Re: Details about libpq cross-version compatibility |