pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Missing loadable libraries when running pg_upgrade 9.1 -> 9.2
6+ messages / 4 participants
[nested] [flat]

* Missing loadable libraries when running pg_upgrade 9.1 -> 9.2
@ 2012-09-12 09:09 Thomas Kellerer <spam_eater@gmx.net>
  2012-09-12 10:03 ` Re: Missing loadable libraries when running pg_upgrade 9.1 -> 9.2 Thomas Kellerer <spam_eater@gmx.net>
  0 siblings, 1 reply; 6+ messages in thread

From: Thomas Kellerer @ 2012-09-12 09:09 UTC (permalink / raw)
  To: pgsql-admin

using Windows XP SP3 (32bit).

When running pg_upgrade with the --check option I get the following error:

     Your installation references loadable libraries that are missing from the
     new installation.  You can add these libraries to the new installation,
     or remove the functions using them from the old installation.  A list of
     problem libraries is in the file:
         loadable_libraries.txt

The content of loadable_libraries.txt is:

     Could not load library "$libdir/targetinfo"
     ERROR:  could not access file "$libdir/targetinfo": No such file or directory

     Could not load library "$libdir/plugins/plugin_debugger"
     ERROR:  could not access file "$libdir/plugins/plugin_debugger": No such file or directory

And indeed there is no targetinfo.dll and no plugin_debugger.dll for 9.2 (there isn't even a plugins directory in lib)

The relevant entries in the postgresql.conf for 9.1 are this:

#shared_preload_libraries = ''		# (change requires restart)
#dynamic_library_path = '$libdir'
#local_preload_libraries = ''

So I'm a bit stumped on why pg_upgrade thinks that I'm using those libraries. Is there a way to find out which function (or extension?) is using those libraries in order to remove that dependency?

The alternative would be to install those libraries, but the StackBuilder doesn't list them, and I didn't find anything in pgAdmin that would allow me to install them. They weren't installed with the installer and they are not part of the Windows ZIP distribution either.

Any ideas?

Thanks in advance
Thomas






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

* Re: Missing loadable libraries when running pg_upgrade 9.1 -> 9.2
  2012-09-12 09:09 Missing loadable libraries when running pg_upgrade 9.1 -> 9.2 Thomas Kellerer <spam_eater@gmx.net>
@ 2012-09-12 10:03 ` Thomas Kellerer <spam_eater@gmx.net>
  2012-09-12 18:11   ` Re: Missing loadable libraries when running pg_upgrade 9.1 -> 9.2 Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 6+ messages in thread

From: Thomas Kellerer @ 2012-09-12 10:03 UTC (permalink / raw)
  To: pgsql-admin

Thomas Kellerer wrote on 12.09.2012 11:09:
> Is there a way to find out which function (or extension?) is using those libraries in order to remove that dependency?

What I ended up doing is to search through my pg_dump backups and I found the "offending" database.
After removing the functions in question, everything went smoothly.

Is there a better way to find those functions rather than doing a grep on the dump files?

Thomas







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

* Re: Missing loadable libraries when running pg_upgrade 9.1 -> 9.2
  2012-09-12 09:09 Missing loadable libraries when running pg_upgrade 9.1 -> 9.2 Thomas Kellerer <spam_eater@gmx.net>
  2012-09-12 10:03 ` Re: Missing loadable libraries when running pg_upgrade 9.1 -> 9.2 Thomas Kellerer <spam_eater@gmx.net>
@ 2012-09-12 18:11   ` Bruce Momjian <bruce@momjian.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Bruce Momjian @ 2012-09-12 18:11 UTC (permalink / raw)
  To: Thomas Kellerer <spam_eater@gmx.net>; +Cc: pgsql-admin

On Wed, Sep 12, 2012 at 12:03:21PM +0200, Thomas Kellerer wrote:
> Thomas Kellerer wrote on 12.09.2012 11:09:
> >Is there a way to find out which function (or extension?) is using those libraries in order to remove that dependency?
> 
> What I ended up doing is to search through my pg_dump backups and I found the "offending" database.
> After removing the functions in question, everything went smoothly.
> 
> Is there a better way to find those functions rather than doing a grep on the dump files?

Well, pg_upgrade uses SQL queries to find those entries, so you could
turn on logging and look at the SQL queries that look in the pg_proc
table for such entries.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +




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

* Missing loadable libraries when running pg_upgrade 9.2 -> 9.3 due to json_enhancements
@ 2014-04-30 05:06 Peter Bengtsson <mail@peterbe.com>
  2014-04-30 05:19 ` Re: Missing loadable libraries when running pg_upgrade 9.2 -> 9.3 due to json_enhancements David G Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Peter Bengtsson @ 2014-04-30 05:06 UTC (permalink / raw)
  To: pgsql-admin

In on OSX and I upgraded homebrew which upgraded me to postgres 9.3.   
Now postgres won’t start because the old database is no longer compatible.  
I found some promising instructions here:
http://blog.55minutes.com/2013/09/postgresql-93-brew-upgrade/

But I get stuck on running this:
pg_upgrade -d /usr/local/var/postgres -D /usr/local/var/postgres9.3 -b /usr/local/Cellar/postgresql/9.2.2/bin/ -B /usr/local/Cellar/postgresql/9.3.4/bin/ -v

(
output here: http://www.peterbe.com/pg_upgrade.log
log here: http://www.peterbe.com/pg_upgrade_server.log
)

The content of loadable_libraries.txt is this::
Could not load library "$libdir/json_enhancements"
ERROR:  could not access file "$libdir/json_enhancements": No such file or directory


Yes, I had json_enhancement installed when I was using postgres 9.2. But I don’t need that any more in 9.3 because json_enhancements was a backport for 9.2.  
The file is still there: /usr/local/Cellar/postgresql/9.2.2/lib/json_enhancements.so

So, I can’t upgrade because I don’t have json_enhancements installed in 9.3. Which is not possible.  
And I can’t upgrade by deleting ./lib/json_enhancements.so ./share/postgresql/extension/json_enhancements--1.0.0.sql and ./share/postgresql/extension/json_enhancements.control

How to get out of this pickle?

By the way, the database that I think I have it installed on is a database I can do without. But I can’t simply `dropdb a_database_with_json_enhancements_installed` because dropdb doesn’t work any more of course.  



--  
Peter Bengtsson
home www.peterbe.com
work www.mozilla.org
fun aroundtheworldgame.com

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

* Re: Missing loadable libraries when running pg_upgrade 9.2 -> 9.3 due to json_enhancements
  2014-04-30 05:06 Missing loadable libraries when running pg_upgrade 9.2 -> 9.3 due to json_enhancements Peter Bengtsson <mail@peterbe.com>
@ 2014-04-30 05:19 ` David G Johnston <david.g.johnston@gmail.com>
  2014-04-30 16:30   ` Re: Re: Missing loadable libraries when running pg_upgrade 9.2 -> 9.3 due to json_enhancements Peter Bengtsson <mail@peterbe.com>
  0 siblings, 1 reply; 6+ messages in thread

From: David G Johnston @ 2014-04-30 05:19 UTC (permalink / raw)
  To: pgsql-admin

Peter Bengtsson wrote
> In on OSX and I upgraded homebrew which upgraded me to postgres 9.3.   
> Now postgres won’t start because the old database is no longer compatible.  
> I found some promising instructions here:
> http://blog.55minutes.com/2013/09/postgresql-93-brew-upgrade/
> 
> But I get stuck on running this:
> pg_upgrade -d /usr/local/var/postgres -D /usr/local/var/postgres9.3 -b
> /usr/local/Cellar/postgresql/9.2.2/bin/ -B
> /usr/local/Cellar/postgresql/9.3.4/bin/ -v
> 
> (
> output here: http://www.peterbe.com/pg_upgrade.log
> log here: http://www.peterbe.com/pg_upgrade_server.log
> )
> 
> The content of loadable_libraries.txt is this::
> Could not load library "$libdir/json_enhancements"
> ERROR:  could not access file "$libdir/json_enhancements": No such file or
> directory
> 
> 
> Yes, I had json_enhancement installed when I was using postgres 9.2. But I
> don’t need that any more in 9.3 because json_enhancements was a backport
> for 9.2.  
> The file is still there:
> /usr/local/Cellar/postgresql/9.2.2/lib/json_enhancements.so
> 
> So, I can’t upgrade because I don’t have json_enhancements installed in
> 9.3. Which is not possible.  
> And I can’t upgrade by deleting ./lib/json_enhancements.so
> ./share/postgresql/extension/json_enhancements--1.0.0.sql and
> ./share/postgresql/extension/json_enhancements.control
> 
> How to get out of this pickle?
> 
> By the way, the database that I think I have it installed on is a database
> I can do without. But I can’t simply `dropdb
> a_database_with_json_enhancements_installed` because dropdb doesn’t work
> any more of course.  

http://www.pgxn.org/dist/json_enhancements/doc/json_enhancements.html

"This module might make using pg_upgrade difficult or even impossible. This
use has not been tested. IF YOU ARE PLANNING TO USE pg_upgrade THEN DO NOT
USE THIS EXTENSION WITHOUT UPGRADE TESTING. If you ignore this warning and
it breaks you get to keep all the pieces."

Doesn't say anything about how to go about a dump/restore style
upgrade...maybe rebuild the schema in 9.3 manually (more-or-less) then do a
data-only dump/restore?

Seems you, in theory, should be able to drop the database and extension from
9.2 then re-do the upgrade without them.

Good Luck...

David J.




--
View this message in context: http://postgresql.1045698.n5.nabble.com/Missing-loadable-libraries-when-running-pg-upgrade-9-2-9-3-d...
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



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

* Re: Re: Missing loadable libraries when running pg_upgrade 9.2 -> 9.3 due to json_enhancements
  2014-04-30 05:06 Missing loadable libraries when running pg_upgrade 9.2 -> 9.3 due to json_enhancements Peter Bengtsson <mail@peterbe.com>
  2014-04-30 05:19 ` Re: Missing loadable libraries when running pg_upgrade 9.2 -> 9.3 due to json_enhancements David G Johnston <david.g.johnston@gmail.com>
@ 2014-04-30 16:30   ` Peter Bengtsson <mail@peterbe.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Peter Bengtsson @ 2014-04-30 16:30 UTC (permalink / raw)
  To: David G Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-admin

I figured it out. Thanks Selena Deckelmann  
http://www.peterbe.com/plog/pg-9.2-to-9.3-json_enhancement

--  
Peter Bengtsson
home www.peterbe.com
work www.mozilla.org
fun aroundtheworldgame.com


On Tuesday, April 29, 2014 at 10:19 PM, David G Johnston wrote:

> Peter Bengtsson wrote
> > In on OSX and I upgraded homebrew which upgraded me to postgres 9.3.  
> > Now postgres won’t start because the old database is no longer compatible.  
> > I found some promising instructions here:
> > http://blog.55minutes.com/2013/09/postgresql-93-brew-upgrade/
> >  
> > But I get stuck on running this:
> > pg_upgrade -d /usr/local/var/postgres -D /usr/local/var/postgres9.3 -b
> > /usr/local/Cellar/postgresql/9.2.2/bin/ -B
> > /usr/local/Cellar/postgresql/9.3.4/bin/ -v
> >  
> > (
> > output here: http://www.peterbe.com/pg_upgrade.log
> > log here: http://www.peterbe.com/pg_upgrade_server.log
> > )
> >  
> > The content of loadable_libraries.txt is this::
> > Could not load library "$libdir/json_enhancements"
> > ERROR: could not access file "$libdir/json_enhancements": No such file or
> > directory
> >  
> >  
> > Yes, I had json_enhancement installed when I was using postgres 9.2. But I
> > don’t need that any more in 9.3 because json_enhancements was a backport
> > for 9.2.  
> > The file is still there:
> > /usr/local/Cellar/postgresql/9.2.2/lib/json_enhancements.so
> >  
> > So, I can’t upgrade because I don’t have json_enhancements installed in
> > 9.3. Which is not possible.  
> > And I can’t upgrade by deleting ./lib/json_enhancements.so
> > ./share/postgresql/extension/json_enhancements--1.0.0.sql and
> > ./share/postgresql/extension/json_enhancements.control
> >  
> > How to get out of this pickle?
> >  
> > By the way, the database that I think I have it installed on is a database
> > I can do without. But I can’t simply `dropdb
> > a_database_with_json_enhancements_installed` because dropdb doesn’t work
> > any more of course.  
> >  
>  
>  
> http://www.pgxn.org/dist/json_enhancements/doc/json_enhancements.html
>  
> "This module might make using pg_upgrade difficult or even impossible. This
> use has not been tested. IF YOU ARE PLANNING TO USE pg_upgrade THEN DO NOT
> USE THIS EXTENSION WITHOUT UPGRADE TESTING. If you ignore this warning and
> it breaks you get to keep all the pieces."
>  
> Doesn't say anything about how to go about a dump/restore style
> upgrade...maybe rebuild the schema in 9.3 manually (more-or-less) then do a
> data-only dump/restore?
>  
> Seems you, in theory, should be able to drop the database and extension from
> 9.2 then re-do the upgrade without them.
>  
> Good Luck...
>  
> David J.
>  
>  
>  
>  
> --
> View this message in context: http://postgresql.1045698.n5.nabble.com/Missing-loadable-libraries-when-running-pg-upgrade-9-2-9-3-d...
> Sent from the PostgreSQL - admin mailing list archive at Nabble.com (http://Nabble.com).
>  
>  
> --  
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org (mailto:pgsql-admin@postgresql.org))
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>  
>  

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


end of thread, other threads:[~2014-04-30 16:30 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-09-12 09:09 Missing loadable libraries when running pg_upgrade 9.1 -> 9.2 Thomas Kellerer <spam_eater@gmx.net>
2012-09-12 10:03 ` Thomas Kellerer <spam_eater@gmx.net>
2012-09-12 18:11   ` Bruce Momjian <bruce@momjian.us>
2014-04-30 05:06 Missing loadable libraries when running pg_upgrade 9.2 -> 9.3 due to json_enhancements Peter Bengtsson <mail@peterbe.com>
2014-04-30 05:19 ` Re: Missing loadable libraries when running pg_upgrade 9.2 -> 9.3 due to json_enhancements David G Johnston <david.g.johnston@gmail.com>
2014-04-30 16:30   ` Re: Re: Missing loadable libraries when running pg_upgrade 9.2 -> 9.3 due to json_enhancements Peter Bengtsson <mail@peterbe.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