From: | jhm713 <jeff(dot)mitchell(dot)mcclelland(at)gmail(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: Inconsistencies restoring public schema ownership from pg_dump |
Date: | 2018-08-31 19:22:58 |
Message-ID: | 1535743378066-0.post@n3.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
I just wanted to echo that this has also caused me problems. We just used
pg_restore and pg_dump to migrate a bunch of databases to a newer version of
postgres. Some of the databases had changed the ownership of the public
schema, and that was lost in the migration.
Maybe changing the owner of the public schema is considered a bad idea, but
our use case is that we (the postgres admins) support a group of developers
that creates many database driven apps. Most of the databases are secured,
but some are public. By letting that group own the public role (they already
own the database and all its other contents), they can decide whether to
grant or revoke permission on the public schema without granting any of them
superuser access.
Basically, what I am suggesting is that, assuming an unmodified public
schema, running these commands
pg_dump -Fc -f test.pg test
pg_restore -s test.pg | grep -i 'alter schema'
should output:
ALTER SCHEMA public OWNER TO postgres;
And of course if the owner had been changed, that would also be reflected.
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-bugs-f2117394.html
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2018-09-01 00:12:00 | Re: BUG #15270: __builtin_isinf conflict when building using clang |
Previous Message | Michael Paquier | 2018-08-31 18:10:08 | Re: BUG #15346: Replica fails to start after the crash |