By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,789 Members | 1,432 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,789 IT Pros & Developers. It's quick & easy.

pg_dump and pg_restore wtih lo

P: n/a
Sam
I'm having trouble restoring databases that have to lo type installed
in /contrib/lo.

The dump seems to work just fine, I get no errors when I execute the
following command

#pg_dump -Fc -o -b mydb > mydb_dump
CREATE DATABASE mydb_restore TEMPLATE template0


But when I execute the following command I get the following error
message:

#pg_restore -d mydb_restore -FC mydb_dump

pg_restore: NOTICE: type "lo" is not yet defined
DETAIL: Creating a shell type definition.
pg_restore: NOTICE: argument type lo is only a shell
pg_restore: [archiver (db)] could not execute query: ERROR: function
lo(oid) does not exist

Does anybody have an idea?
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
In article <ff************************@posting.google.com>,
sa*@edup.tudelft.nl (Sam) wrote:
I'm having trouble restoring databases that have to lo type installed
in /contrib/lo.

The dump seems to work just fine, I get no errors when I execute the
following command

#pg_dump -Fc -o -b mydb > mydb_dump
CREATE DATABASE mydb_restore TEMPLATE template0


But when I execute the following command I get the following error
message:

#pg_restore -d mydb_restore -FC mydb_dump

pg_restore: NOTICE: type "lo" is not yet defined
DETAIL: Creating a shell type definition.
pg_restore: NOTICE: argument type lo is only a shell
pg_restore: [archiver (db)] could not execute query: ERROR: function
lo(oid) does not exist

Does anybody have an idea?


Quoting the manual (under 22.1.4 Caveats in 7.4 docs):

" For reasons of backward compatibility, pg_dump does not dump large
objects by default. To dump large objects you must use either the custom
or the TAR output format, and use the -b option in pg_dump. See the
reference pages for details. The directory contrib/pg_dumplo of the
PostgreSQL source tree also contains a program that can dump large
objects.

"Please familiarize yourself with the pg_dump reference page. "

Hope that helps.

Boyd

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.