pg_dump permissions problem - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject pg_dump permissions problem
Date
Msg-id 3F77FF03.8060903@familyhealth.com.au
Whole thread Raw
Responses Re: pg_dump permissions problem  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi guys,

My live 7.3.4 database dumps data like this:

SET SESSION AUTHORIZATION 'auadmin';

--
-- TOC entry 346 (OID 1012952)
-- Name: log_freeprofile; Type: TABLE; Schema: public; Owner: auadmin
--

CREATE TABLE log_freeprofile (    date date DEFAULT ('now'::text)::date NOT NULL,    "start" integer DEFAULT '0',
completeinteger DEFAULT '0',    gotojoin integer DEFAULT '0',    payment integer DEFAULT '0',    done integer DEFAULT
'0',   joined integer DEFAULT '0'
 
);


--
-- TOC entry 347 (OID 1012952)
-- Name: log_freeprofile; Type: ACL; Schema: public; Owner: auadmin
--

REVOKE ALL ON TABLE log_freeprofile FROM PUBLIC;
GRANT ALL ON TABLE log_freeprofile TO brett;
GRANT INSERT,SELECT,UPDATE ON TABLE log_freeprofile TO "au-php";
GRANT SELECT ON TABLE log_freeprofile TO GROUP readonly;
REVOKE ALL ON TABLE log_freeprofile FROM auadmin;


Now, loading this into 7.4beta3 gives this error:

ERROR:  dependent privileges exist

When executing the REVOKE ALL line.

I think this occurs because we do all the grants as auadmin, not as the 
superuser loading the file.  This means that all the grants that we 
grant are dependent privilegs, and hence that REVOKE line needs a 
CASCADE option.

Actually, why does that line even exist!?!?  Why do we need to REVOKE 
ALL from the table owner??

What should we do about this?

Chris




pgsql-hackers by date:

Previous
From: strk
Date:
Subject: finding memory leaks in extensions
Next
From: Hannu Krosing
Date:
Subject: Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)