Thread: PG_UPGRADE major issue

PG_UPGRADE major issue

From
Marcos Cano
Date:
so i'm trying to migrate/upgrade from 8.3.2 to 9.2.4 and following the
instructions of the documentation i've found myself in a major issue which
has overwhelmed my little knowledge.
these were the steps i followed:

1)downloand and install 9.2.4, with the contrib packages.
2)init the 9.2.4 cluster in /usr/local/pgsql9.2.4/data, i also have the
8.3.2 cluster in /usr/local/pgsql/data
3) stop both servers
4)change the 9.2.4 port to 5433
5) i run this command:

/usr/local/pgsql9.2.4/bin/./pg_upgrade -b /usr/local/pgsql/bin/ -B
/usr/local/pgsql9.2.4/bin/ -c -d /usr/local/pgsql/data/ -D
/usr/local/pgsql9.2.4/data/ -p 5432 -P 5433 -v


so after some 30 seconds the upgrade process seemed like "working"  but
after it crashed
with this message:
Checking for presence of required libraries                 fatal

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

Failure, exiting
"/usr/local/pgsql9.2.4/bin/pg_ctl" -w -D "/usr/local/pgsql9.2.4/data/" -o ""
-m fast stop >> "pg_upgrade_server.log" 2>&1


so i went to check the log and found:


ERROR:  could not access file "$libdir/liblwgeom": No such file or directory
STATEMENT:  LOAD '$libdir/liblwgeom'
command: "/usr/local/pgsql9.2.4/bin/pg_ctl" -w -D
"/usr/local/pgsql9.2.4/data/" -o "" -m fast stop >> "pg_upgrade_server.log"
2>&1
LOG:  received fast shutdown request
LOG:  aborting any active transactions
waiting for server to shut down....FATAL:  terminating connection due to
administrator command
LOG:  could not send data to client: Broken pipe
LOG:  shutting down
LOG:  database system is shut down
 done
server stopped


please help as i dont have any idea what's going wrong




--
View this message in context: http://postgresql.1045698.n5.nabble.com/PG-UPGRADE-major-issue-tp5759906.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


Re: PG_UPGRADE major issue

From
"Burgholzer, Robert (DEQ)"
Date:
This error:
"ERROR:  could not access file "$libdir/liblwgeom": No such file or directory"

Means that you have PostGIS installed and it can't find it in the upgrade path I believe.  Did you get postGI
configuredcorrectly in the upgraded version? 

r.b.



Re: PG_UPGRADE major issue

From
Marcos Cano
Date:
thanks for your reply, yes i did not have any postgis installation.

i'm a little bit confused right and i really need some help.. this is my
case:
i have pg8.3.2 running with postgis 1.3.x, i'm willing to upgrade to pg9.2.4
using the pg_upgrade utility, now the problem is that apparently i need to
upgrade also to postgis 2.0.3 (so that's to upgrade in once) i read the
instruction in postgis webpage and i need to do a hard_upgrade... which is a
dump and restore.

so i don't know how to proceed... install pg9.2.4 -> upgrade pg8.3.2 to pg
9.2.4-> then postgis??? or

install pg9.2.4->install postgis 2.0.3 in the pg9.2.4 ->   (pg_upgrade of
the DB on pg8.3 to 9.2.4) OR hard_upgrade using the postgis scripts?

thanks



--
View this message in context: http://postgresql.1045698.n5.nabble.com/PG-UPGRADE-major-issue-tp5759906p5760168.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


Re: PG_UPGRADE major issue

From
"Burgholzer, Robert (DEQ)"
Date:
Marcos,
This answer might be best put over on the postGIS listserv, but I will suggest a couple of strategies based on some
differingassumptions and certainties. 

One certainty - it seems that you absolutely have to have some form of PostGIS installed in order to perform the
postgreSQLupgrade using pg_upgrade. 
One variable - whether or not you will have to do the "hard upgrade" required by the postGIS version when doing the
standardPostgreSQL upgrade.  In other words -- is the postgreSQL upgrade essentially doing the same as the "hard
upgrade"?
   If YES - then install postgis 1.3.x on your 9.2.4 then use pg_upgrade, then do the pgis hard upgrade
   If NO - install postgis 2.x on your 9.2.4 then use pg_upgrade

This is a very relevant case study, one that I myself will be going through very very shortly here so I am interested
tofollow your progress and assist in whatever way I might. 

Regards,
r.b.




Re: PG_UPGRADE major issue

From
Marcos Cano
Date:
thank you very much


On Thu, Jun 20, 2013 at 11:01 AM, Burgholzer, Robert (DEQ) <Robert.Burgholzer@deq.virginia.gov> wrote:
Marcos,
This answer might be best put over on the postGIS listserv, but I will suggest a couple of strategies based on some differing assumptions and certainties.

One certainty - it seems that you absolutely have to have some form of PostGIS installed in order to perform the postgreSQL upgrade using pg_upgrade.
One variable - whether or not you will have to do the "hard upgrade" required by the postGIS version when doing the standard PostgreSQL upgrade.  In other words -- is the postgreSQL upgrade essentially doing the same as the "hard upgrade"?
   If YES - then install postgis 1.3.x on your 9.2.4 then use pg_upgrade, then do the pgis hard upgrade
   If NO - install postgis 2.x on your 9.2.4 then use pg_upgrade

This is a very relevant case study, one that I myself will be going through very very shortly here so I am interested to follow your progress and assist in whatever way I might.

Regards,
r.b.