public inbox for [email protected]
help / color / mirror / Atom feedFrom: Heikki Linnakangas <[email protected]>
To: Sebastien FLAESCH <[email protected]>
Cc: [email protected]
Subject: Re: Details about libpq cross-version compatibility
Date: Thu, 13 Sep 2012 10:01:10 +0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
On 12.09.2012 18:21, Sebastien FLAESCH wrote:
> I believe there is some info missing in the page describing libpq
> programs build:
>
> http://www.postgresql.org/docs/9.2/interactive/libpq-build.html
>
> I am working with PostgreSQL for several years now (since V7),
> maintaining a set
> of "db drivers" for our system, that can be used with the different
> PostgreSQL
> versions.
>
> We need to build our binaries for different versions of PostgreSQL,
> today it's
> from 8.3 to 9.2 ...
>
> What is the compatibility rule regarding this?
>
> Can I compile / link with a PostgreSQL 9.1 environment and deploy on 9.2
> ???
>
> Can I compile / link with a PostgreSQL 8.x environment and deploy on 9.x
> ???
If your binary is just a client application that uses libpq to speak to
the server, you can use any (supported) version of libpq with any
(supported) server version. There hasn't been any incompatible protocol
changes since version 7.4, which introduced the protocol version 3, and
even that was done in a backwards-compatible fashion so that even 9.2
server still supports the old version 2 of the protocol.
Now, another question is what happens if you compile your binaries
against e.g 9.1 version of libpq, but at runtime, you have 9.2 libpq
installed. I think that should work too, but not vice versa, if you use
any new functions from the 9.2 libpq library. In general, you should
have the same or higher version of libpq at runtime that the binaries
were built with.
The version number bump from 8.x to 9.0 was made because 9.0 introduced
many new features, but from a compatibility policy point-of-view, 8.4 ->
9.0 is no different than, say, going from 8.3 to 8.4.
> The problem is that we have to ship several versions of the drivers for all
> the PostgreSQL versions that are in the support live cycle, today this is
> from 8.3 to 9.2 ...
That really shouldn't be necessary.
> So far, we followed the version policy as described here:
>
> http://www.postgresql.org/support/versioning
>
> I think it's ok to follow this rule, but would feel much better if it was
> clearly stated in the "Building libpq Programs" page.
Agreed. Either that page, or the libpq top page at
http://www.postgresql.org/docs/devel/static/libpq.html, or a new
"cross-version compatibility" section under that. Could you write up a
few paragraphs for the manual please? That would be much appreciated,
you'd be in a good position to do that since you're facing the problem
right now.
- Heikki
view thread (9+ messages) latest in thread
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]
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