Any change someone who knows (or who can declare that we not fix existing dumps) comment on this?

Chris

Christopher Kings-Lynne wrote:

I think this is wrong, primarily because it's gonna be seriously
incompatible with existing dump files.  The existing technique is
that each TOC entry says who owns the object.  You should use that
information and not have to rely on new additions to the file format.


This is why GRANT/REVOKE has to be postponed to the end.  I think it
would be a lot simpler and more reliable if you also postponed ALTER
OWNER.


OK, implementing this is nasty. How do I collect up all the ACLs from EXISTING custom archives and move them to the end?? This is hard because ACLs are just dependents on their parent object and cannot be sorted on their own to the end of the dump.

Since the dumping process outputs to stdout as it goes along, I'd have to create some big in-memory string of all acls and owners collected so far. That seems bad.

The alternative is to scan the entire archive twice. On the second scan I would only output owner and acl commands.

Another option is to simply not bother fixing old custom dumps. They could just still restore exactly how they would have without any changes from me. I would add new TOC types to the 7.5 pg_dump that could be sorted to the end...

What do I do?

Chris


---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings

Reply via email to