Re: pg_dump -s -b

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump -s -b
Date: 2016-11-19 17:20:07
Message-ID: 24987.1479576007@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Stephen Frost <sfrost(at)snowman(dot)net> writes:
> To wit, our docs specifically say:
> ----
> Include large objects in the dump. This is the default behavior except
> when --schema, --table, or --schema-only is specified, so the -b switch
> is only useful to add large objects to selective dumps.
> ----

Clearly, this is an oversimplification.

> However, a 'pg_dump -s -b' won't include blobs, which appears to be due
> to the masking performed in _tocEntryRequired() whereby we strip the
> REQ_DATA out if we are in schema-only mode.
> Further, though perhaps less surprising, we don't include blobs when
> --section=post-data is set, and only the definition of the blob (but no
> data) when --section=pre-data is used.

IMO, blobs are data, so those behaviors are correct. The docs should
be fixed to match the code.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua Drake 2016-11-19 17:25:34 Re: Mail thread references in commits
Previous Message Stephen Frost 2016-11-19 17:08:35 pg_dump -s -b