From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-03-08 15:30:36 |
Message-ID: | 9268.1457451036@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Andreas Joseph Krogh <andreas(at)visena(dot)com> writes:
> P tirsdag 08. mars 2016 kl. 15:43:37, skrev Adrian Klaver <
> adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>>:
> Do you care about not dumping the pg_largeobject table or not dumping
> the data it contains?
>
> I have several tables with OID-columns and I'd like to dump my DB without any
> data in pg_largeobject (> 95% of the space is occupied by data in
> pg_largeobject).
> I've tried to exclude (using -T) the tables containing OID-columns but
> pg_largeobject is still dumped containing the data it seems.
A look at the pg_dump source code says that it skips blobs if any of
-s, -n, -t are used. There's a -b switch to undo that and include
them anyway, but no "inverse -b" to skip them in an otherwise-complete
dump.
So you could do something along the lines of pg_dump -t '*' ...
although this will result in *all* non-schema-named objects being
excluded, I believe, which might be a problem.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Joseph Krogh | 2016-03-08 15:46:11 | Re: Exclude pg_largeobject form pg_dump |
Previous Message | Adrian Klaver | 2016-03-08 15:17:03 | Re: Inserting JSON via Java PreparedStatment |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2016-03-08 15:34:22 | Re: Parallel query fails on standby server |
Previous Message | Andrew Dunstan | 2016-03-08 15:28:18 | Re: VS 2015 support in src/tools/msvc |