Re: Shared PostgreSQL libraries and symbol versioning

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Shared PostgreSQL libraries and symbol versioning
Дата
Msg-id 20180409202343.GK27724@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: Shared PostgreSQL libraries and symbol versioning  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: Shared PostgreSQL libraries and symbol versioning  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Greetings,

* Peter Eisentraut (peter.eisentraut@2ndquadrant.com) wrote:
> On 4/5/18 02:04, Pavel Raiskup wrote:
> > Hello, for the support of multiple versions of PostgreSQL RPM packages on
> > one system, we are thinking about having only one libpq.so.5
> > (libecpg.so.6, libpgtype.so.3 respectively) supported and about building
> > (linking) all the PostgreSQL package versions against that.  The pattern
> > would mean that we'd have to update the system-wide libraries before
> > adding support for new PostgreSQL major version and that the older
> > packages (say version =< 9.6) would be run against libs from newer PG
> > package (say libpq.so.5 from v10).
> >
> > Do you think it is a good idea in general?
>
> yes

Adding symbol versioning would probably be a good idea, yes, though we
don't have as much need as others since we've really had a rather stable
ABI for a long time.

> > As a followup thought; there are probably two major obstacles ATM
> >
> >   - the DSOs' symbols are not yet versioned, and
> >   - the build-system doesn't seem to know how to -lpq link against
> >     external libpq.so

I've not looked but neither of those strike me as terribly difficult to
overcome, assuming they need to be overcome.

> It's not clear to me why you would need these, given that Debian has
> been doing this for many years without this.

Huh?

objdump -T /usr/lib/x86_64-linux-gnu/libpq.so.5.10

...
0000000000021a50 g    DF .text    000000000000014c  Base        pg_char_to_encoding
00000000000270d0 g    DF .text    000000000000002c  Base        PQsslStruct
0000000000013880 g    DF .text    00000000000001d2  Base        PQmakeEmptyPGresult
0000000000017900 g    DF .text    0000000000000012  Base        PQmblen
000000000000ac20 g    DF .text    00000000000002c0  Base        PQencryptPasswordConn
000000000000fcc0 g    DF .text    00000000000000f3  Base        PQresetPoll
0000000000014790 g    DF .text    00000000000000ef  Base        PQsendQuery
000000000001fc50 g    DF .text    0000000000000061  Base        initPQExpBuffer
00000000000152a0 g    DF .text    0000000000000012  Base        PQsendDescribePortal
...

No, Debian doesn't do symbol versioning for libpq and I don't believe it
ever has.

There are other libraries in Debian where the are using symbol
versioning, of course, but libpq isn't one of those.

Thanks!

Stephen

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Shared PostgreSQL libraries and symbol versioning
Следующее
От: Mark Dilger
Дата:
Сообщение: Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS