pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feedLet's get rid of the separate minor version numbers for shlibs
10+ messages / 6 participants
[nested] [flat]
* Let's get rid of the separate minor version numbers for shlibs
@ 2016-08-15 19:06 Tom Lane <tgl@sss.pgh.pa.us>
2016-08-15 19:18 ` Re: Let's get rid of the separate minor version numbers for shlibs Robert Haas <robertmhaas@gmail.com>
2016-08-15 20:36 ` Re: Let's get rid of the separate minor version numbers for shlibs Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2016-08-16 07:30 ` Re: Let's get rid of the separate minor version numbers for shlibs Michael Meskes <meskes@postgresql.org>
0 siblings, 3 replies; 10+ messages in thread
From: Tom Lane @ 2016-08-15 19:06 UTC (permalink / raw)
To: pgsql-hackers; +Cc: Michael Meskes <meskes@postgreSQL.org>
After doing the tedious and easily forgotten (I almost did forget)
minor version bumps for our shared libraries,
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=0b9358d4406b9b45a06855d53f491cc7c...
it suddenly struck me that in the brave new two-part-version-number
world we could dispense with that annual task by hard-wiring the
various shlibs' SO_MINOR_VERSION numbers to equal the current release
branch's major version number, ie
SO_MINOR_VERSION=$MAJORVERSION
That would give us an automatic annual change in the minor version.
If we ever made an incompatible change in a shlib, we could advance
its SO_MAJOR_VERSION but keep this rule for the minor version (there's
no law that says we have to reset the minor version when we do that).
This would be basically no change for libpq, since its scheduled
minor version number for this release cycle happens to be 10 anyway.
ecpg's various shlibs are at SO_MINOR_VERSION 8 or 9, so they would
basically skip a minor version number or two, but that seems fine.
The only place where we'd have a problem is the ecpg preprocessor
itself, which is scheduled to be at version 4.13 this year. However,
that version number is purely cosmetic since AFAICS the only thing
that gets done with it is to print it in response to -v and suchlike.
I don't really see why ecpg has its own version number anyway ---
why don't we go over to giving it the same version number as the
rest of PG? So it would just print the PG_VERSION string in the places
where it currently prints the numbers hard-wired in ecpg/preproc/Makefile.
Thoughts?
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Let's get rid of the separate minor version numbers for shlibs
2016-08-15 19:06 Let's get rid of the separate minor version numbers for shlibs Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-08-15 19:18 ` Robert Haas <robertmhaas@gmail.com>
2016-08-15 19:32 ` Re: Let's get rid of the separate minor version numbers for shlibs Tom Lane <tgl@sss.pgh.pa.us>
2 siblings, 1 reply; 10+ messages in thread
From: Robert Haas @ 2016-08-15 19:18 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-hackers; Michael Meskes <meskes@postgresql.org>
On Mon, Aug 15, 2016 at 3:06 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> After doing the tedious and easily forgotten (I almost did forget)
> minor version bumps for our shared libraries,
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=0b9358d4406b9b45a06855d53f491cc7c...
>
> it suddenly struck me that in the brave new two-part-version-number
> world we could dispense with that annual task by hard-wiring the
> various shlibs' SO_MINOR_VERSION numbers to equal the current release
> branch's major version number, ie
>
> SO_MINOR_VERSION=$MAJORVERSION
>
> That would give us an automatic annual change in the minor version.
> If we ever made an incompatible change in a shlib, we could advance
> its SO_MAJOR_VERSION but keep this rule for the minor version (there's
> no law that says we have to reset the minor version when we do that).
>
> This would be basically no change for libpq, since its scheduled
> minor version number for this release cycle happens to be 10 anyway.
> ecpg's various shlibs are at SO_MINOR_VERSION 8 or 9, so they would
> basically skip a minor version number or two, but that seems fine.
>
> The only place where we'd have a problem is the ecpg preprocessor
> itself, which is scheduled to be at version 4.13 this year. However,
> that version number is purely cosmetic since AFAICS the only thing
> that gets done with it is to print it in response to -v and suchlike.
> I don't really see why ecpg has its own version number anyway ---
> why don't we go over to giving it the same version number as the
> rest of PG? So it would just print the PG_VERSION string in the places
> where it currently prints the numbers hard-wired in ecpg/preproc/Makefile.
>
> Thoughts?
Well, part of the motivation for moving to one part version numbers
was that it would be less confusing, but this seems like it would
create more confusing minor version numbers for shared libraries. I
think it would be strange to have a library that went from version
1.10 to version 2.11 without passing through 2.0 - 2.10. I wouldn't
rate that a critical defect, but if you don't like strange version
numbering conventions, I wouldn't pick that one.
I wonder if we could address this problem by setting the version
numbers using a formula based on the major version, instead of using
the major version directly. e.g. if something is scheduled to be 1.8
this year, make it 1.(VERSION - 2). Then, you'd only have to update
the formula when bumping the major version - e.g. if we go to 2.0 in
version 14, you'd change the formula at that time to 2.(VERSION - 14).
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Let's get rid of the separate minor version numbers for shlibs
2016-08-15 19:06 Let's get rid of the separate minor version numbers for shlibs Tom Lane <tgl@sss.pgh.pa.us>
2016-08-15 19:18 ` Re: Let's get rid of the separate minor version numbers for shlibs Robert Haas <robertmhaas@gmail.com>
@ 2016-08-15 19:32 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 10+ messages in thread
From: Tom Lane @ 2016-08-15 19:32 UTC (permalink / raw)
To: Robert Haas <robertmhaas@gmail.com>; +Cc: pgsql-hackers; Michael Meskes <meskes@postgresql.org>
Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Aug 15, 2016 at 3:06 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> That would give us an automatic annual change in the minor version.
>> If we ever made an incompatible change in a shlib, we could advance
>> its SO_MAJOR_VERSION but keep this rule for the minor version (there's
>> no law that says we have to reset the minor version when we do that).
> Well, part of the motivation for moving to one part version numbers
> was that it would be less confusing, but this seems like it would
> create more confusing minor version numbers for shared libraries. I
> think it would be strange to have a library that went from version
> 1.10 to version 2.11 without passing through 2.0 - 2.10. I wouldn't
> rate that a critical defect, but if you don't like strange version
> numbering conventions, I wouldn't pick that one.
Well, we could address that when and if we ever do a major-version
sonumber bump. We have not done that in the last ten years and frankly
I doubt we ever would; that would imply the sort of client API break
that we don't like to make.
> I wonder if we could address this problem by setting the version
> numbers using a formula based on the major version, instead of using
> the major version directly.
Possibly, though I think arithmetic is not Makefiles' strong suit.
In any case, I don't see a need for it right now, unless you're objecting
to the ecpg version changes I outlined.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Let's get rid of the separate minor version numbers for shlibs
2016-08-15 19:06 Let's get rid of the separate minor version numbers for shlibs Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-08-15 20:36 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2016-08-15 21:11 ` Re: Let's get rid of the separate minor version numbers for shlibs Stephen Frost <sfrost@snowman.net>
2 siblings, 1 reply; 10+ messages in thread
From: Peter Eisentraut @ 2016-08-15 20:36 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-hackers; +Cc: Michael Meskes <meskes@postgreSQL.org>
On 8/15/16 3:06 PM, Tom Lane wrote:
> That would give us an automatic annual change in the minor version.
> If we ever made an incompatible change in a shlib, we could advance
> its SO_MAJOR_VERSION but keep this rule for the minor version (there's
> no law that says we have to reset the minor version when we do that).
Let's look into getting rid of the minor versions altogether. They
don't serve any technical purpose in most cases. Library packaging
policies have evolved quite a bit over the years; maybe there is some
guidance there to make this simpler.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Let's get rid of the separate minor version numbers for shlibs
2016-08-15 19:06 Let's get rid of the separate minor version numbers for shlibs Tom Lane <tgl@sss.pgh.pa.us>
2016-08-15 20:36 ` Re: Let's get rid of the separate minor version numbers for shlibs Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
@ 2016-08-15 21:11 ` Stephen Frost <sfrost@snowman.net>
2016-08-15 22:45 ` Re: Let's get rid of the separate minor version numbers for shlibs Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
0 siblings, 1 reply; 10+ messages in thread
From: Stephen Frost @ 2016-08-15 21:11 UTC (permalink / raw)
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-hackers; Michael Meskes <meskes@postgreSQL.org>
Peter,
* Peter Eisentraut (peter.eisentraut@2ndquadrant.com) wrote:
> On 8/15/16 3:06 PM, Tom Lane wrote:
> > That would give us an automatic annual change in the minor version.
> > If we ever made an incompatible change in a shlib, we could advance
> > its SO_MAJOR_VERSION but keep this rule for the minor version (there's
> > no law that says we have to reset the minor version when we do that).
>
> Let's look into getting rid of the minor versions altogether. They
> don't serve any technical purpose in most cases. Library packaging
> policies have evolved quite a bit over the years; maybe there is some
> guidance there to make this simpler.
Eh? Last I checked, we needed minor version bumps to ensure that
binaries compiled against later versions, which might use newer symbols,
don't try to link against older libraries (which wouldn't have those
symbols).
Thanks!
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Let's get rid of the separate minor version numbers for shlibs
2016-08-15 19:06 Let's get rid of the separate minor version numbers for shlibs Tom Lane <tgl@sss.pgh.pa.us>
2016-08-15 20:36 ` Re: Let's get rid of the separate minor version numbers for shlibs Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2016-08-15 21:11 ` Re: Let's get rid of the separate minor version numbers for shlibs Stephen Frost <sfrost@snowman.net>
@ 2016-08-15 22:45 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2016-08-16 00:31 ` Re: Let's get rid of the separate minor version numbers for shlibs Tom Lane <tgl@sss.pgh.pa.us>
2016-08-16 12:51 ` Re: Let's get rid of the separate minor version numbers for shlibs Greg Stark <stark@mit.edu>
0 siblings, 2 replies; 10+ messages in thread
From: Peter Eisentraut @ 2016-08-15 22:45 UTC (permalink / raw)
To: Stephen Frost <sfrost@snowman.net>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-hackers; Michael Meskes <meskes@postgreSQL.org>
On 8/15/16 5:11 PM, Stephen Frost wrote:
> Eh? Last I checked, we needed minor version bumps to ensure that
> binaries compiled against later versions, which might use newer symbols,
> don't try to link against older libraries (which wouldn't have those
> symbols).
Let's review:
What we install is
libpq.so.5.8 (actual file)
libpq.so.5 -> libpq.so.5.8
libpq.so -> libpq.so.5.8
The second one is the one used at run-time, looked up by SONAME.
The third one is the one used at build time, because -lpq means look for
libpq.so.
If we instead installed
libpq.so.5 (actual file)
libpq.so -> libpq.so.5
nothing would effectively change.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Let's get rid of the separate minor version numbers for shlibs
2016-08-15 19:06 Let's get rid of the separate minor version numbers for shlibs Tom Lane <tgl@sss.pgh.pa.us>
2016-08-15 20:36 ` Re: Let's get rid of the separate minor version numbers for shlibs Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2016-08-15 21:11 ` Re: Let's get rid of the separate minor version numbers for shlibs Stephen Frost <sfrost@snowman.net>
2016-08-15 22:45 ` Re: Let's get rid of the separate minor version numbers for shlibs Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
@ 2016-08-16 00:31 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 10+ messages in thread
From: Tom Lane @ 2016-08-16 00:31 UTC (permalink / raw)
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; +Cc: Stephen Frost <sfrost@snowman.net>; pgsql-hackers; Michael Meskes <meskes@postgresql.org>
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> On 8/15/16 5:11 PM, Stephen Frost wrote:
>> Eh? Last I checked, we needed minor version bumps to ensure that
>> binaries compiled against later versions, which might use newer symbols,
>> don't try to link against older libraries (which wouldn't have those
>> symbols).
> Let's review:
> What we install is
> libpq.so.5.8 (actual file)
> libpq.so.5 -> libpq.so.5.8
> libpq.so -> libpq.so.5.8
> The second one is the one used at run-time, looked up by SONAME.
Right, and that is all exactly per distro recommendations, at least
for Red Hat, and I'm pretty sure other distros too. This has not
been changed recently TTBOMK. See for example
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
The only argument that particular document offers for including the
minor number is that it makes it easier to see which specific
version you have installed. That's not much, but it's not
nothing either. There might be other reasons I'm not remembering.
Also, SO_MINOR_VERSION is included in the shlib name for most
Unix-oid platforms, not just Linux. Even if we were to conclude
this was no longer recommended practice for Linux, I doubt we
should unilaterally drop the practice everywhere.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Let's get rid of the separate minor version numbers for shlibs
2016-08-15 19:06 Let's get rid of the separate minor version numbers for shlibs Tom Lane <tgl@sss.pgh.pa.us>
2016-08-15 20:36 ` Re: Let's get rid of the separate minor version numbers for shlibs Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2016-08-15 21:11 ` Re: Let's get rid of the separate minor version numbers for shlibs Stephen Frost <sfrost@snowman.net>
2016-08-15 22:45 ` Re: Let's get rid of the separate minor version numbers for shlibs Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
@ 2016-08-16 12:51 ` Greg Stark <stark@mit.edu>
2016-08-16 14:16 ` Re: Let's get rid of the separate minor version numbers for shlibs Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 10+ messages in thread
From: Greg Stark @ 2016-08-16 12:51 UTC (permalink / raw)
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; +Cc: Stephen Frost <sfrost@snowman.net>; Tom Lane <tgl@sss.pgh.pa.us>; pgsql-hackers; Michael Meskes <meskes@postgresql.org>
On Mon, Aug 15, 2016 at 11:45 PM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> If we instead installed
>
> libpq.so.5 (actual file)
> libpq.so -> libpq.so.5
>
> nothing would effectively change.
It would make it impossible to have multiple versions installed. One
doesn't normally have multiple versions with the same soname installed
since the linker will only be actually using one of them anyways but
it makes it a lot easier to manage transitions and debugging. I don't
think it would be very standard to not have a minor version at all.
Also, the above is only true for Linux. Other operating systems may
set things up differently. IIRC NetBSD did do something a lot more
sophisticated where it linked to the correct minor version or gave a
warning and linked with a newer minor version but refused to link to
older minor versions even if it was the right major version -- or
something like that.
But I think Tom was not proposing dropping the minor version at all,
just setting the minor version equal to the release. So the our soname
would be libpq.so.5.10 then libpq.so.5.11 and so on until we make an
incompatible change and then it would become libpq.so.6.12 for
example. I think it would be a bit confusing to see both the minor and
major version bump and to see a major version start at a high number.
But sonames are pretty technical internal goo and it's not too bad. I
think it would be a reasonable idea.
It does rule out the possibility of having a minor bump in the soname
for a point-release, which as you point out wouldn't do much on Linux
but on other operating systems might be a useful thing.
--
greg
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Let's get rid of the separate minor version numbers for shlibs
2016-08-15 19:06 Let's get rid of the separate minor version numbers for shlibs Tom Lane <tgl@sss.pgh.pa.us>
2016-08-15 20:36 ` Re: Let's get rid of the separate minor version numbers for shlibs Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2016-08-15 21:11 ` Re: Let's get rid of the separate minor version numbers for shlibs Stephen Frost <sfrost@snowman.net>
2016-08-15 22:45 ` Re: Let's get rid of the separate minor version numbers for shlibs Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2016-08-16 12:51 ` Re: Let's get rid of the separate minor version numbers for shlibs Greg Stark <stark@mit.edu>
@ 2016-08-16 14:16 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 10+ messages in thread
From: Tom Lane @ 2016-08-16 14:16 UTC (permalink / raw)
To: Greg Stark <stark@mit.edu>; +Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; Stephen Frost <sfrost@snowman.net>; pgsql-hackers; Michael Meskes <meskes@postgresql.org>
Greg Stark <stark@mit.edu> writes:
> It does rule out the possibility of having a minor bump in the soname
> for a point-release, which as you point out wouldn't do much on Linux
> but on other operating systems might be a useful thing.
I believe we could legally set SO_MINOR_VERSION to, say, 10.1 if we had to
(cf comment about it in Makefile.shlib), so a workaround is available for
that case. And the current scheme isn't any better: if, say, 9.5 is at
libpq.so.5.8, and we wish to bump the soname for its next point release,
we can't use soname 5.9 because that's already taken by 9.6. We'd have
to go to soname 5.8.1. So it's pretty much exactly the same thing.
Mechanically, that could look like editing the back branch's makefile
to say
SO_MINOR_VERSION=$(MAJORVERSION).1
This would not need to propagate into any other branch (unless we were
making similar changes for similar reasons in other back branches, of
course).
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Let's get rid of the separate minor version numbers for shlibs
2016-08-15 19:06 Let's get rid of the separate minor version numbers for shlibs Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-08-16 07:30 ` Michael Meskes <meskes@postgresql.org>
2 siblings, 0 replies; 10+ messages in thread
From: Michael Meskes @ 2016-08-16 07:30 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-hackers
> The only place where we'd have a problem is the ecpg preprocessor
> itself, which is scheduled to be at version 4.13 this year. However,
> that version number is purely cosmetic since AFAICS the only thing
> that gets done with it is to print it in response to -v and suchlike.
> I don't really see why ecpg has its own version number anyway ---
> why don't we go over to giving it the same version number as the
> rest of PG? So it would just print the PG_VERSION string in the
> places
> where it currently prints the numbers hard-wired in
> ecpg/preproc/Makefile.
Absolutely agreed. The current numbering is historical but does not
seem to make sense anymore. Besides, the main usage I see is that you
can see which preprocessor version was used to create a certain C file.
With the preprocessor's parser being auto-generated having the PG
version makes much more sense IMO.
Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 10+ messages in thread
end of thread, other threads:[~2016-08-16 14:16 UTC | newest]
Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-08-15 19:06 Let's get rid of the separate minor version numbers for shlibs Tom Lane <tgl@sss.pgh.pa.us>
2016-08-15 19:18 ` Robert Haas <robertmhaas@gmail.com>
2016-08-15 19:32 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-08-15 20:36 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2016-08-15 21:11 ` Stephen Frost <sfrost@snowman.net>
2016-08-15 22:45 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2016-08-16 00:31 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-08-16 12:51 ` Greg Stark <stark@mit.edu>
2016-08-16 14:16 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-08-16 07:30 ` Michael Meskes <meskes@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox