Thread: Upgrading 7.3.9 -> 7.4.8 - trouble with blobs

Upgrading 7.3.9 -> 7.4.8 - trouble with blobs

From
Christian Goetze
Date:
I have a database with blobs, I dump it with the following command:

pg_dump\
 --host=$SENSAGE_DB_HOST\
 --port=$SENSAGE_DB_PORT\
 -U $SENSAGE_DB_ROOT_USER\
 --blobs\
 --create\
 --format=t\
 --file="$upgrade_dump"\
$SENSAGE_DB_NAME

I then move the data directory to the side, install the new version in
place, start it up, let it initialize it's new data storare, then I try
restoring my database with this command:

pg_restore\
 --host=$SENSAGE_DB_HOST\
 --port=$SENSAGE_DB_PORT\
 -U $SENSAGE_DB_ROOT_USER\
 --create\
 --format=t\
"$upgrade_dump"

Seems to work fine, except I get:

 pg_restore: [archiver] WARNING: skipping large-object restoration

How do I ensure that the blobs get restored?
--
cg



Re: Upgrading 7.3.9 -> 7.4.8 - trouble with blobs

From
Tom Lane
Date:
Christian Goetze <cg@sensage.com> writes:
> pg_restore\
>  --host=$SENSAGE_DB_HOST\
>  --port=$SENSAGE_DB_PORT\
>  -U $SENSAGE_DB_ROOT_USER\
>  --create\
>  --format=t\
> "$upgrade_dump"

You need "-d template1" in there as well.  Without a -d, --host and
--port don't actually do anything, I believe; you just get a text SQL
dump on stdout.

            regards, tom lane