From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "bossartn(at)amazon(dot)com" <bossartn(at)amazon(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #14242: Role with a setconfig "role" setting to a nonexistent role causes pg_upgrade to fail |
Date: | 2016-07-12 02:15:38 |
Message-ID: | CAKFQuwapgVmeJA8h5-WrQiM7aayzc4xkdZdSHvWFV=6Ha7HpKg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Sorry...I keep trying to dig deeper and keep discovering/realizing stuff.
On Mon, Jul 11, 2016 at 10:08 PM, David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>
>>
> Fun times...
> [up-thread commands still in effect]
> ALTER DATABASE postgres SET ROLE loginrole2;
> psql -U loginrole postgres
> WARNING: permission denied to set role "grouprole"
> WARNING: permission denied to set role "loginrole2"
> postgres=>
>
> In light of the above double-warning I'm concerned that "precedence" isn't
> happening correctly here - but that could be an implementation artifact
> (the more specific combination is executed second so that it ends up
> overriding any settings attempted to be set by the less specific
> configuration). In this case, though, the failed attempt to set the
> db+role setting would have resulted in the role setting taking effect if it
> was valid. I don't recall us making this distinction clear in the
> documentation.
>
>
Actually, apparently the system realizes its attempt to SET ROLE <role-set
value> failed and proceeded to attempt to "SET ROLE <db-set value>" -
assuming the visible order is reflective of reality. So it does have the
necessary smarts and also fall-back-try-again logic.
The rest of the documentation observations stand.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | harukat | 2016-07-12 08:32:20 | BUG #14243: pg_basebackup failes by a STATUS_DELETE_PENDING file |
Previous Message | David G. Johnston | 2016-07-12 02:08:54 | Re: BUG #14242: Role with a setconfig "role" setting to a nonexistent role causes pg_upgrade to fail |