Skip site navigation (1) Skip section navigation (2)

Re: pg_dump / restore of empty database gives errors

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rod Taylor <rbt(at)rbt(dot)ca>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>,Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: pg_dump / restore of empty database gives errors
Date: 2003-02-23 18:00:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Rod Taylor <rbt(at)rbt(dot)ca> writes:
>>> ERROR:  dependent privileges exist (use CASCADE to revoke them too)
>> I saw that a couple weeks ago, and then was unable to reproduce it later

> Seems to be by design.  Create an empty schema with no permissions.
> First REVOKE sees lack of permissions, and adds them for the owner.  The
> GRANT makes PUBLIC dependent on the owner for permissions.  The second
> REVOKE attempts to remove the permissions of the owner (replace
> CURRENT_USER with the current user) which PUBLIC is now dependent upon.

Hmm.  So the real story here is that the permissions set up by initdb
for PUBLIC are actually an illegal state: postgres has granted
permissions to public that it isn't allowed to.  When pg_dump tries to
reproduce that state, it can't.  (There may also be an issue with the
order in which pg_dump issues its revoke/grant operations, ie, there
might be legal combinations that it can't reproduce.)  Peter, what
do you think?

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Joe ConwayDate: 2003-02-23 18:10:19
Subject: Re: [HACKERS] loading libraries on Postmaster startup
Previous:From: Rod TaylorDate: 2003-02-23 17:03:30
Subject: Re: pg_dump / restore of empty database gives errors

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group