Re: Does pg_dumpall do BLOBs too?

From: Frank Joerdens <frank(at)joerdens(dot)de>
To: pgsql-general(at)postgresql(dot)org
Cc: Kerstin Stolt <hank(at)fas-art(dot)com>
Subject: Re: Does pg_dumpall do BLOBs too?
Date: 2002-01-13 15:44:58
Message-ID: 20020113164458.B16938@superfly.archi-me-des.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-jdbc

On Sat, Jan 12, 2002 at 11:28:28AM -0500, Tom Lane wrote:
> Frank Joerdens <frank(at)joerdens(dot)de> writes:
> > The wrapper script doesn't seem to pass the option -Ft to pg_dump so it
> > doesn't support output formats other than plain text which means you
> > can't do BLOBs.
>
> The trouble is that pg_dumpall wants to concatenate the output from
> several pg_dumps, intermixed with commands issued by itself. Easy to do
> with text outputs, not so easy with the non-text formats.

True.

> I could see making pg_dumpall emit a script that has the global setup
> commands plus pg_restore calls referencing separately-created data
> files, one per database. Trouble with that is that the data files
> couldn't be sent to pg_dumpall's stdout, which means that pg_dumpall
> would have to include options for deciding where to put them.

As a default, create a subdir (maybe call it pg_dumpall_files[current
system date]) in the current directory where you'd also put the script
itself?

And what
> about the case where you have more than 4GB of data and a system that
> doesn't do large files? Presently it's easy to pipe pg_dumpall to
> "split", and cat the segments together to feed to psql when reloading.
> But that method won't work under this scenario.

On starting the script, give a message saying something along the lines
of 'If you have a lot of data, you might end up with files larger than 2
GB which may not work on some systems. In that case you should use the
plaintext option and dump and restore any databases with BLOBs
separately.' Then offer to continue or to quit?

What I just did to dump everything out and reload it was to do
pg_dumpall and pg_dump for the one (out of 26) databases that contained
BLOBs separately, then reload everything from the dumpall script, drop
the BLOB database, recreate it, and then restore it from its separate
script. I suppose that didn't kill me but an integrated solution would
be nicer and cleaner. I've got a sysadmin intern here next month who I
might put to the task.

Regards, Frank

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2002-01-13 16:53:51 Re: mysql-pgsql comparison
Previous Message mlw 2002-01-13 14:56:23 Re: mysql-pgsql comparison

Browse pgsql-jdbc by date

  From Date Subject
Next Message Ed Yu 2002-01-14 04:04:16 DatabaseMetaData.java patch (7.1.3)
Previous Message Timo Savola 2002-01-12 22:21:33 Re: ResultSet memory usage