Re: Re: could not migrate 8.0.13 database with large object data to 9.5.1 - Mailing list pgsql-general

From John R Pierce
Subject Re: Re: could not migrate 8.0.13 database with large object data to 9.5.1
Date
Msg-id 56D88466.7000704@hogranch.com
Whole thread Raw
In response to Re: could not migrate 8.0.13 database with large object data to 9.5.1  ("Premsun Choltanwanich" <Premsun@nsasia.co.th>)
List pgsql-general
On 3/3/2016 3:53 AM, Premsun Choltanwanich wrote:
>
> I have no source code for this contrib/lo and dll/function seem
> already be stored with my 8.0.13 installation package.

upon looking at the current docs again in the light of day, I see that
there *IS* a contrib/lo module in all recent versions.

try, before doing the restore... as postgres with your empty database...

     psql mynewdatabase -c "create extension lo"

I would also consider doing the dump in two parts.   first pass use
--schema-only   to just dump the defninitions, and restore these, this
will create your database structures with no data.   you may need to
edit the generated .sql file to remove these redundant/erroneous
function definitions.     then once the schema is created cleanly, do
the same dump but with --data-only and to a different file, this will
dump just the actual database data, which you them 'restore' to the same
database you've already created the schema in...





--
john r pierce, recycling bits in santa cruz



pgsql-general by date:

Previous
From: Rémi Cura
Date:
Subject: PLPythonu for production server
Next
From: Julien Rouhaud
Date:
Subject: Re: bloated postgres data folder, clean up