Re: libpq backwards compatbility

From: Andy Halsall <andyh(at)live(dot)co(dot)uk>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: libpq backwards compatbility
Date: 2016-11-17 10:58:24
Message-ID: DB6PR0901MB1045F9177192D91A6CC444BDF5B10@DB6PR0901MB1045.eurprd09.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks for the response. I have to also ask about binary compatibility in the other direction. I.e. An application compiled against 9.6 libpq headers but running against the 9.3 libpq library. Obviously you'd never choose to deploy this way in general, but we're not using any new libpq features and so I guess the question is whether or not existing libpq library features are forwards compatible with later compilations?

While this is far from ideal, we want the next release of our application to be compiled against the target libpq version (9.6), however the PostgreSQL version on the deployment platforms isn't under our control. It could be 9.3 for a time before getting upgraded to 9.6.

Testing suggests that all's ok but, if we can't be sure, we'll have to either compile the next release of the application against 9.3 until we know all PostgreSQL platforms have been upgraded to 9.6. Or make it a dependency of the application release that the PostgreSQL platform is 9.6.

Andy

________________________________

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Sent: 03 November 2016 09:35
To: Andy Halsall
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] libpq backwards compatbility

On Wed, Nov 2, 2016 at 11:58 PM, Andy Halsall <andyh(at)live(dot)co(dot)uk> wrote:
> Can we assume that the 9.6 libpq library is backwards compatible with
> applications compiled against 9.3 headers? I wouldn't expect to have to
> re-compile our application against 9.6 libpq headers and redeploy because
> we're not taking advantage of any new features and nothing seems to have
> been deprecated.
>
> The release notes talk about additions to libpq in section E.2.3.9 "Client
> Interfaces". I'd expect any un-changed features to be backwards compatible.
> Limited testing suggests this is so but I can't find a clear statement.
>
> Could somebody please advise?

libpq has a long history of keeping a backward-compatible interface
across the ages, and that pays in the long term. Your application
compiled with 9.3 headers would link to libpq.so.5, so that would be
binary-compatible with 9.6. For consistency's sake, you may want to
recompile it anyway.
--
Michael

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2016-11-17 14:45:41 Re: pg_class (system) table increasing size.
Previous Message Mark Anns 2016-11-17 10:09:31 Re: How the Planner in PGStrom differs from PostgreSQL?