Upgrading 7.3.9 -> 7.4.8 - trouble with blobs

Started by Christian Goetzeover 20 years ago4 messagesgeneral
Jump to latest
#1Christian Goetze
cg@sensage.com

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Christian Goetze (#1)
Re: Upgrading 7.3.9 -> 7.4.8 - trouble with blobs

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"

Seems to work fine, except I get:

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

IIRC, you get that if you're asking it to emit a text script rather than
connect directly to the destination database server. I think you need a
"-d databasename" switch to make that happen.

regards, tom lane

#3Christian Goetze
cg@sensage.com
In reply to: Tom Lane (#2)
Re: Upgrading 7.3.9 -> 7.4.8 - trouble with blobs

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

IIRC, you get that if you're asking it to emit a text script rather than
connect directly to the destination database server. I think you need a
"-d databasename" switch to make that happen.

Does this mean that the only way to upgrade is to have both the old and
the new databases running _at the same time_?

BTW, on further inspection, it would seem that the bytea fields loaded
properly after all - is the warning just a bug, or are "large objects"
something else altogether?
--
cg

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Christian Goetze (#3)
Re: Upgrading 7.3.9 -> 7.4.8 - trouble with blobs

Christian Goetze <cg@sensage.com> writes:

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

IIRC, you get that if you're asking it to emit a text script rather than
connect directly to the destination database server. I think you need a
"-d databasename" switch to make that happen.

Does this mean that the only way to upgrade is to have both the old and
the new databases running _at the same time_?

No, unless you were hoping to pipe the output of pg_dump straight into
pg_restore or something like that.

BTW, on further inspection, it would seem that the bytea fields loaded
properly after all - is the warning just a bug, or are "large objects"
something else altogether?

AFAICS, the warning only comes out if there are large objects in the
dump file (and no, these have nothing to do with bytea fields).

regards, tom lane