Re: PQnotifies() in 7.3 broken? - Mailing list pgsql-hackers

From Kevin Brown
Subject Re: PQnotifies() in 7.3 broken?
Date
Msg-id 20021211233047.GD20203@filer
Whole thread Raw
In response to Re: PQnotifies() in 7.3 broken?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: PQnotifies() in 7.3 broken?
List pgsql-hackers
Bruce Momjian wrote:
> We bump at the beginning only because we _know_ we want new users to use
> the newer library.  (Does the runtime linker know to get the highest
> minor numbered library with the same major number?)

It probably depends on the system, but the runtime linker isn't that
smart under Linux.  It looks for a match for the major version only,
so for instance in the case of libpq major version 2, it'll look for
libpq.so.2 in the library search path.  Multiple minor versions of the
library are managed via symlinks under Linux (libpq.so.2 ->
libpq.so.2.2, for instance).

> Bumping at the end is done only when we know there is some change. The
> big question is whether a change in the API or a change in the code
> (recompile) is enough to bump that major version number.  We always make
> some force-recompile change in the library in each release, don't we? 
> Do we just bump the major in every major release?

It wouldn't be a terribly bad idea to do that, but the main criteria
for bumping the major version should be binary compatibility.  If
applications which link against libpq.so.2 reside on the system and
libpq.so.2.3 has binary incompatibilities with libpq.so.2.2, then
installing libpq.so.2.3 on the system will break all the binaries that
use libpq.so.2.  That's why it's important to bump the major version
when there are binary incompatibilities: you can install libpq.so.3
and all the while, applications that rely on libpq.so.2 will still run
(because you can have both of those library versions installed on the
system at the same time without conflict).

> I usually bumped the minor at the beginning because this allows beta
> testers to not have _extra_ versions of the library laying around, and
> also because we make minor library changes often during beta, so it
> isn't clear when to bump that number.

I think it makes sense to change the minor number whenever there are
code changes to the library that don't introduce binary
incompatibilities.  Whether you bump the minor version during a new
release when there are no changes to the library itself is probably a
matter of preference only.  It doesn't really hurt anything and may
make management of the version number easier.



-- 
Kevin Brown                          kevin@sysexperts.com


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Problems with ALTER DOMAIN patch
Next
From: Tom Lane
Date:
Subject: Re: Problems with ALTER DOMAIN patch