pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins?
8+ messages / 4 participants
[nested] [flat]

* pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins?
@ 2018-04-18 14:07 Pavel Raiskup <praiskup@redhat.com>
  2018-04-18 14:18 ` Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Adrian Klaver <adrian.klaver@aklaver.com>
  2018-04-18 14:22 ` Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 8+ messages in thread

From: Pavel Raiskup @ 2018-04-18 14:07 UTC (permalink / raw)
  To: pgsql-general

Hi all,

with a huge delay, I've seen this question [1].

. and it seems like the hstore.so was somewhat intimately integrated into
OP's database so the '/usr/bin/pg_dump --schema-only --binary-upgrade
--format=custom' called through 'pg_upgrade' failed with:

  pg_dump: [archiver (db)] query failed: ERROR:  could not access file
  "$libdir/hstore": No such file or directory

Which means that the dump from old datadir, with old server (without
hstore.so packaged) failed.  But playing with hstore.so a bit, the upgrade
always worked smoothly for me even without the "old" hstore.so

Googling around, I only found that there were some incompatible changes
historically in hstore.so causing pg_upgrade failure;  but this is
different issue -- in the issue I talk about now the module was not found
at all, even though it is usually even not searched for.

So the question is what circumstances could cause this issue in
particular?  Is it expected in general that, to make the pg_upgrade run
smooth, all the "loaded" server modules are built against and available
for the --old-bindir server?  Don't we have some reproducer for this
kind of issues?

[1] https://ask.fedoraproject.org/en/question/69316/postgresql-doesnt-work-after-upgrade-to-f22/
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1557490 

Thank for hints,
Pavel







^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins?
  2018-04-18 14:07 pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Pavel Raiskup <praiskup@redhat.com>
@ 2018-04-18 14:18 ` Adrian Klaver <adrian.klaver@aklaver.com>
  1 sibling, 0 replies; 8+ messages in thread

From: Adrian Klaver @ 2018-04-18 14:18 UTC (permalink / raw)
  To: Pavel Raiskup <praiskup@redhat.com>; pgsql-general

On 04/18/2018 07:07 AM, Pavel Raiskup wrote:
> Hi all,
> 
> with a huge delay, I've seen this question [1].
> 
> . and it seems like the hstore.so was somewhat intimately integrated into
> OP's database so the '/usr/bin/pg_dump --schema-only --binary-upgrade
> --format=custom' called through 'pg_upgrade' failed with:
> 
>    pg_dump: [archiver (db)] query failed: ERROR:  could not access file
>    "$libdir/hstore": No such file or directory

 From [1] it seems there is confusion in the system about where $libdir 
is. Did anyone run pg_config to try to track this down?

> 
> Which means that the dump from old datadir, with old server (without
> hstore.so packaged) failed.  But playing with hstore.so a bit, the upgrade
> always worked smoothly for me even without the "old" hstore.so

I am not following the above. If you played with hstore.so how could it 
not be around? Or does this have something to do with 'old'?

> 
> Googling around, I only found that there were some incompatible changes
> historically in hstore.so causing pg_upgrade failure;  but this is
> different issue -- in the issue I talk about now the module was not found
> at all, even though it is usually even not searched for.
> 
> So the question is what circumstances could cause this issue in
> particular?  Is it expected in general that, to make the pg_upgrade run
> smooth, all the "loaded" server modules are built against and available
> for the --old-bindir server?  Don't we have some reproducer for this
> kind of issues?
> 
> [1] https://ask.fedoraproject.org/en/question/69316/postgresql-doesnt-work-after-upgrade-to-f22/
> [2] https://bugzilla.redhat.com/show_bug.cgi?id=1557490
> 
> Thank for hints,
> Pavel
> 
> 
> 
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins?
  2018-04-18 14:07 pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Pavel Raiskup <praiskup@redhat.com>
@ 2018-04-18 14:22 ` Tom Lane <tgl@sss.pgh.pa.us>
  2018-04-18 14:43   ` Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Adrian Klaver <adrian.klaver@aklaver.com>
  2018-04-18 14:54   ` Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Pavel Raiskup <praiskup@redhat.com>
  1 sibling, 2 replies; 8+ messages in thread

From: Tom Lane @ 2018-04-18 14:22 UTC (permalink / raw)
  To: Pavel Raiskup <praiskup@redhat.com>; +Cc: pgsql-general

Pavel Raiskup <praiskup@redhat.com> writes:
> . and it seems like the hstore.so was somewhat intimately integrated into
> OP's database so the '/usr/bin/pg_dump --schema-only --binary-upgrade
> --format=custom' called through 'pg_upgrade' failed with:
>   pg_dump: [archiver (db)] query failed: ERROR:  could not access file
>   "$libdir/hstore": No such file or directory
> Which means that the dump from old datadir, with old server (without
> hstore.so packaged) failed.  But playing with hstore.so a bit, the upgrade
> always worked smoothly for me even without the "old" hstore.so

Hi Pavel,

There are certainly plenty of reasons why extension .so's might be needed
during pg_dump, even in a binary-upgrade situation.  The first example
that comes to mind is that an hstore-type constant appearing in a view
definition would require hstore_out() to be invoked while dumping the view
definition.

I don't remember anymore whether I'd set up the postgresql-update package
to include the contrib modules for the old server version.  If I didn't,
it was an oversight :-(.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins?
  2018-04-18 14:07 pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Pavel Raiskup <praiskup@redhat.com>
  2018-04-18 14:22 ` Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Tom Lane <tgl@sss.pgh.pa.us>
@ 2018-04-18 14:43   ` Adrian Klaver <adrian.klaver@aklaver.com>
  2018-04-18 15:04     ` Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Pavel Raiskup <praiskup@redhat.com>
  2018-04-19 13:15     ` Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Jerry Sievers <gsievers19@comcast.net>
  1 sibling, 2 replies; 8+ messages in thread

From: Adrian Klaver @ 2018-04-18 14:43 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; Pavel Raiskup <praiskup@redhat.com>; +Cc: pgsql-general

On 04/18/2018 07:22 AM, Tom Lane wrote:
> Pavel Raiskup <praiskup@redhat.com> writes:
>> . and it seems like the hstore.so was somewhat intimately integrated into
>> OP's database so the '/usr/bin/pg_dump --schema-only --binary-upgrade
>> --format=custom' called through 'pg_upgrade' failed with:
>>    pg_dump: [archiver (db)] query failed: ERROR:  could not access file
>>    "$libdir/hstore": No such file or directory
>> Which means that the dump from old datadir, with old server (without
>> hstore.so packaged) failed.  But playing with hstore.so a bit, the upgrade
>> always worked smoothly for me even without the "old" hstore.so
> 
> Hi Pavel,
> 
> There are certainly plenty of reasons why extension .so's might be needed
> during pg_dump, even in a binary-upgrade situation.  The first example
> that comes to mind is that an hstore-type constant appearing in a view
> definition would require hstore_out() to be invoked while dumping the view
> definition.

I am obviously missing something. If the old server was using hstore in 
a database how could hstore.so could be accessible to it but not pg_dump?

> 
> I don't remember anymore whether I'd set up the postgresql-update package
> to include the contrib modules for the old server version.  If I didn't,
> it was an oversight :-(.
> 
> 			regards, tom lane
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins?
  2018-04-18 14:07 pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Pavel Raiskup <praiskup@redhat.com>
  2018-04-18 14:22 ` Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Tom Lane <tgl@sss.pgh.pa.us>
  2018-04-18 14:43   ` Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Adrian Klaver <adrian.klaver@aklaver.com>
@ 2018-04-18 15:04     ` Pavel Raiskup <praiskup@redhat.com>
  2018-04-18 15:25       ` Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Adrian Klaver <adrian.klaver@aklaver.com>
  1 sibling, 1 reply; 8+ messages in thread

From: Pavel Raiskup @ 2018-04-18 15:04 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-general

On Wednesday, April 18, 2018 4:43:01 PM CEST Adrian Klaver wrote:
> On 04/18/2018 07:22 AM, Tom Lane wrote:
> > Pavel Raiskup <praiskup@redhat.com> writes:
> >> . and it seems like the hstore.so was somewhat intimately integrated into
> >> OP's database so the '/usr/bin/pg_dump --schema-only --binary-upgrade
> >> --format=custom' called through 'pg_upgrade' failed with:
> >>    pg_dump: [archiver (db)] query failed: ERROR:  could not access file
> >>    "$libdir/hstore": No such file or directory
> >> Which means that the dump from old datadir, with old server (without
> >> hstore.so packaged) failed.  But playing with hstore.so a bit, the upgrade
> >> always worked smoothly for me even without the "old" hstore.so
> > 
> > Hi Pavel,
> > 
> > There are certainly plenty of reasons why extension .so's might be needed
> > during pg_dump, even in a binary-upgrade situation.  The first example
> > that comes to mind is that an hstore-type constant appearing in a view
> > definition would require hstore_out() to be invoked while dumping the view
> > definition.
> 
> I am obviously missing something. If the old server was using hstore in 
> a database how could hstore.so could be accessible to it but not pg_dump?

Because on Fedora we usually run pg_upgrade after distribution upgrade
(e.g. for Fedora 27 => Fedora 28 upgrade it means also upgrade from PostgreSQL
9.6 to 10), and then we provide the old server in different package
(postgresql-upgrade) which has limited feature set (including the missing
hstore.so module).

Pavel

> > 
> > I don't remember anymore whether I'd set up the postgresql-update package
> > to include the contrib modules for the old server version.  If I didn't,
> > it was an oversight :-(.
> > 
> > 			regards, tom lane
> > 
> > 
> 
> 
> 








^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins?
  2018-04-18 14:07 pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Pavel Raiskup <praiskup@redhat.com>
  2018-04-18 14:22 ` Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Tom Lane <tgl@sss.pgh.pa.us>
  2018-04-18 14:43   ` Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Adrian Klaver <adrian.klaver@aklaver.com>
  2018-04-18 15:04     ` Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Pavel Raiskup <praiskup@redhat.com>
@ 2018-04-18 15:25       ` Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Adrian Klaver @ 2018-04-18 15:25 UTC (permalink / raw)
  To: Pavel Raiskup <praiskup@redhat.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-general

On 04/18/2018 08:04 AM, Pavel Raiskup wrote:
> On Wednesday, April 18, 2018 4:43:01 PM CEST Adrian Klaver wrote:

>> I am obviously missing something. If the old server was using hstore in
>> a database how could hstore.so could be accessible to it but not pg_dump?
> 
> Because on Fedora we usually run pg_upgrade after distribution upgrade
> (e.g. for Fedora 27 => Fedora 28 upgrade it means also upgrade from PostgreSQL
> 9.6 to 10), and then we provide the old server in different package
> (postgresql-upgrade) which has limited feature set (including the missing
> hstore.so module).

Thanks, now it makes sense.

> 
> Pavel
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins?
  2018-04-18 14:07 pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Pavel Raiskup <praiskup@redhat.com>
  2018-04-18 14:22 ` Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Tom Lane <tgl@sss.pgh.pa.us>
  2018-04-18 14:43   ` Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Adrian Klaver <adrian.klaver@aklaver.com>
@ 2018-04-19 13:15     ` Jerry Sievers <gsievers19@comcast.net>
  1 sibling, 0 replies; 8+ messages in thread

From: Jerry Sievers @ 2018-04-19 13:15 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Pavel Raiskup <praiskup@redhat.com>; pgsql-general

Adrian Klaver <adrian.klaver@aklaver.com> writes:

> On 04/18/2018 07:22 AM, Tom Lane wrote:
>
>> Pavel Raiskup <praiskup@redhat.com> writes:
>>> . and it seems like the hstore.so was somewhat intimately integrated into
>>> OP's database so the '/usr/bin/pg_dump --schema-only --binary-upgrade
>>> --format=custom' called through 'pg_upgrade' failed with:
>>>    pg_dump: [archiver (db)] query failed: ERROR:  could not access file
>>>    "$libdir/hstore": No such file or directory
>>> Which means that the dump from old datadir, with old server (without
>>> hstore.so packaged) failed.  But playing with hstore.so a bit, the upgrade
>>> always worked smoothly for me even without the "old" hstore.so
>>
>> Hi Pavel,
>>
>> There are certainly plenty of reasons why extension .so's might be needed
>> during pg_dump, even in a binary-upgrade situation.  The first example
>> that comes to mind is that an hstore-type constant appearing in a view
>> definition would require hstore_out() to be invoked while dumping the view
>> definition.
>
> I am obviously missing something. If the old server was using hstore
> in a database how could hstore.so could be accessible to it but not
> pg_dump?

I presume because something stole the depended upon libs but went
unnoticed due to the referring objs being generally unused.

Along comes pg_upgrade and the requisite dump... BOOM!



>
>>
>> I don't remember anymore whether I'd set up the postgresql-update package
>> to include the contrib modules for the old server version.  If I didn't,
>> it was an oversight :-(.
>>
>> 			regards, tom lane
>>
>>

-- 
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net
p: 312.241.7800




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins?
  2018-04-18 14:07 pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Pavel Raiskup <praiskup@redhat.com>
  2018-04-18 14:22 ` Re: pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Tom Lane <tgl@sss.pgh.pa.us>
@ 2018-04-18 14:54   ` Pavel Raiskup <praiskup@redhat.com>
  1 sibling, 0 replies; 8+ messages in thread

From: Pavel Raiskup @ 2018-04-18 14:54 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general

On Wednesday, April 18, 2018 4:22:23 PM CEST Tom Lane wrote:
> Pavel Raiskup <praiskup@redhat.com> writes:
> > [2] https://bugzilla.redhat.com/show_bug.cgi?id=1557490
>
> There are certainly plenty of reasons why extension .so's might be needed
> during pg_dump, even in a binary-upgrade situation.  The first example
> that comes to mind is that an hstore-type constant appearing in a view
> definition would require hstore_out() to be invoked while dumping the view
> definition.

Thanks for the example, Tom.  I'll resolve the bug [2] then.

Pavel







^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2018-04-19 13:15 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-04-18 14:07 pg_upgrade: when the --old-bindir requires "additional" $libdir/ plugins? Pavel Raiskup <praiskup@redhat.com>
2018-04-18 14:18 ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-04-18 14:22 ` Tom Lane <tgl@sss.pgh.pa.us>
2018-04-18 14:43   ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-04-18 15:04     ` Pavel Raiskup <praiskup@redhat.com>
2018-04-18 15:25       ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-04-19 13:15     ` Jerry Sievers <gsievers19@comcast.net>
2018-04-18 14:54   ` Pavel Raiskup <praiskup@redhat.com>

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