Обсуждение: Missing loadable libraries when running pg_upgrade 9.2 -> 9.3 due to json_enhancements

Поиск
Список
Период
Сортировка

Missing loadable libraries when running pg_upgrade 9.2 -> 9.3 due to json_enhancements

От
Peter Bengtsson
Дата:
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:

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

Re: Missing loadable libraries when running pg_upgrade 9.2 -> 9.3 due to json_enhancements

От
David G Johnston
Дата:
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-due-to-json-enhancements-tp5801937p5801938.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


Re: Re: Missing loadable libraries when running pg_upgrade 9.2 -> 9.3 due to json_enhancements

От
Peter Bengtsson
Дата:
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:

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

(
)

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.


"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.




--
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: