Fixes for pg_dump and ownership/acl problems

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Fixes for pg_dump and ownership/acl problems
Date: 2004-06-29 02:19:13
Message-ID: 40E0D1A1.6080507@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Hi,

This patch fixes pg_dump for the existing ownership and acl problems.
It does not address the known damaged acls after an ownership change.

It's hacky (although officially hacky :) ) in regards that it parses the
dropStmt on each object to get the objects name. This is necessary
because of an oversight in the initial design of the binary format.

I've done quite a bit of testing with it, and it seems to work OK. The
main thing to review would be my C string manipulation stuff that
extracts the object from the drop statement. I've been careful to avoid
overruns and segaults, but I may have made an error.

I've resurrected the old --use-set-session-authorization flag for sql
standard dumps using SET SESSION AUTHORIZATION instead of OWNER TO.

After my other pg_dumpall patch is committed, we might need to add this
new flag to pg_dumpall as well.

Chris

Attachment Content-Type Size
pg_dump_owners.txt.gz application/x-gzip 4.3 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Christopher Kings-Lynne 2004-06-29 03:02:32 Re: Fixes for pg_dump and ownership/acl problems
Previous Message Simon Riggs 2004-06-28 20:58:57 PITR Archive Recovery