Re: OWNER TO on all objects

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: OWNER TO on all objects
Date: 2004-06-17 08:38:27
Message-ID: 40D15883.5000707@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Darko Prenosil 2004-06-17 12:47:15 SPI question
Previous Message Christopher Kings-Lynne 2004-06-17 01:58:47 Re: OWNER TO on all objects