Re: pgsql: Reserve the "pg_" namespace for roles

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: "pgsql-committers(at)postgresql(dot)org" <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Reserve the "pg_" namespace for roles
Date: 2016-04-30 22:11:29
Message-ID: 20160430221129.GD556@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Fri, Apr 29, 2016 at 08:05:15AM -0400, Stephen Frost wrote:
> Bruce,
>
> On Friday, April 29, 2016, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>
> On Fri, Apr  8, 2016 at 08:56:34PM +0000, Stephen Frost wrote:
> > Reserve the "pg_" namespace for roles
> >
> > This will prevent users from creating roles which begin with "pg_" and
> > will check for those roles before allowing an upgrade using pg_upgrade.
> >
> > This will allow for default roles to be provided at initdb time.
>
> Nice you added the check to pg_upgrade, but I assume a pg_dumpall
> restore is going to fail pretty badly, e.g. any pg_* object assignment
> will fail.  I guess there isn't much we can do to fix that.
>
>
> The pg_dumpall will work but will throw a warning. A restore will fail to
> recreate any pg_* roles and there could be follow-on errors from that, of
> course. 

OK, good --- that's the best we can do.

> I had pg_dumpall throw an error initially, but based on discussion that was
> considered too harsh. 

OK.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2016-05-01 15:27:33 pgsql: Add a --non-master-only option to git_changelog.
Previous Message Tom Lane 2016-04-30 19:06:31 pgsql: Update contrib/unaccent documentation about its unaccent.rules f