On Mon, Jul 28, 2014 at 10:55 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Stephen Frost <sfrost@snowman.net> writes:
>> If we're going to change this, it seems to me that the only option would
>> be to change the dump format... Just off-the-cuff, I'm wondering if we
>> could actually not change the real 'format' but simply promote each ACL
>> entry (and similar cases..) to top-level objects and declare that TOC
>> entries should be single statements.
>
> I don't think we want even more TOC entries, but it would not be
> unreasonable to insist that the statement(s) within a TOC entry be
> subdivided somehow. Essentially the payload of a TOC entry becomes
> a list of strings rather than just one string.
>
> That would mean that the problem could not be fixed for existing archive
> files; but that seems OK, given the rather small number of complaints
> so far.
>
> If we had something like that, I'd be strongly inclined to get rid of
> the existing convention whereby comments and ACL commands are separate
> TOC entries, and make them part of the parent object's TOC entry (which'd
> mean we'd want to label the sub-strings so we can tell whether they are
> main object, comment, or ACL). The fewer TOC entries we can have, the
> better; there is no reason why comments/ACLs should be independently
> sortable.
Maybe, but I think people will still want an option to skip restoring
them altogether (at least for ACLs).
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company