pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Moreno Andreo <moreno.andreo@evolu-s.it>
To: pgsql-general@lists.postgresql.org
Subject: Re: REVOKE to an user that doesn't exist
Date: Wed, 12 Dec 2018 16:09:08 +0100
Message-ID: <6de32efb-ba14-719a-de09-4a2c4fae298d@evolu-s.it> (raw)
In-Reply-To: <edc8163a-d338-aeb8-fb1f-fc81f4f47ac6@aklaver.com>
References: <c9bdaeb8-5685-d86c-a18e-6694088a6b78@evolu-s.it>
	<edc8163a-d338-aeb8-fb1f-fc81f4f47ac6@aklaver.com>

Il 12/12/2018 15:39, Adrian Klaver ha scritto:
> On 12/12/18 5:11 AM, Moreno Andreo wrote:
>> Hi all,
>>
>> I'm trying to pg_upgrade a cluster from 9.1 to 10 (Windows 10, but I 
>> don't think it matters).
>>
>> At a certain point an error is thrown while parsing a trigger:
>>
>> could not execute query: ERROR:  role "1067431" does not exist
>>
>> command was: REVOKE ALL ON FUNCTION "x"() FROM PUBLIC;
>> GRANT ALL ON FUNCTION "public"."x"() TO "1067431" WITH GRANT OPTION;
>>
>> Here's the evidence :-)
>
> The below is from the 9.1 cluster, correct?
Correct, 9.1.6, IIRC
>
>> postgres=# select * from pg_roles;
>>       rolname      | rolsuper | rolinherit | rolcreaterole | 
>> rolcreatedb | rolcatupdate | rolcanlogin | rolreplication | 
>> rolconnlimit | rolpassword | rolvaliduntil | rolconfig |   oid
>> ------------------+----------+------------+---------------+-------------+--------------+-------------+----------------+--------------+-------------+---------------+-----------+--------- 
>>
>>   postgres         | t        | t          | t             | t | 
>> t            | t           | t |           -1 | ******** 
>> |               |           |      10
>>   user1      | t        | t          | t             | t | t | 
>> t           | t              |           -1 | ******** 
>> |               |           |   16393
>>   user2     | t        | t          | t             | t           | 
>> t            | t           | t |           -1 | ******** 
>> |               |           |   16394
>>   user3       | f        | t          | f             | f | f | 
>> t           | f              |           -1 | ******** 
>> |               |           |   16395
>>   user4 | f        | t          | t             | t           | 
>> f            | t           | f              |           -1 | ******** 
>> |               |           | 1067432
>>   user5          | f        | t          | t             | 
>> t           | f            | t           | f |           -1 | 
>> ******** |               |           |   30602
>> (6 rows)
>>
>> So, no user with that OID. I checked in the trigger pointed to the 
>> error and I found
>>
>> GRANT EXECUTE ON FUNCTION x() TO "1067431" WITH GRANT OPTION;
>
> I am not following as a trigger would not have that in its code.
>
> Are you referring to the function x()?
>
> If so is the GRANT in the function?
Sorry, the grant above is extracted from the CREATE statement that 
PgAdmin3 shows when you click on the trigger






view thread (6+ messages)  latest in thread

Message-ID: <6de32efb-ba14-719a-de09-4a2c4fae298d@evolu-s.it>
Permalink:  ../6de32efb-ba14-719a-de09-4a2c4fae298d@evolu-s.it/
Also on:    postgresql.org/message-id/6de32efb-ba14-719a-de09-4a2c4fae298d@evolu-s.it

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: moreno.andreo@evolu-s.it
  Subject: Re: REVOKE to an user that doesn't exist
  In-Reply-To: <6de32efb-ba14-719a-de09-4a2c4fae298d@evolu-s.it>
  References: <c9bdaeb8-5685-d86c-a18e-6694088a6b78@evolu-s.it> <edc8163a-d338-aeb8-fb1f-fc81f4f47ac6@aklaver.com> <6de32efb-ba14-719a-de09-4a2c4fae298d@evolu-s.it>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox