Re: REVOKE to an user that doesn't exist - Mailing list pgsql-general

From Adrian Klaver
Subject Re: REVOKE to an user that doesn't exist
Date
Msg-id edc8163a-d338-aeb8-fb1f-fc81f4f47ac6@aklaver.com
Whole thread Raw
In response to REVOKE to an user that doesn't exist  (Moreno Andreo <moreno.andreo@evolu-s.it>)
Responses Re: REVOKE to an user that doesn't exist  (Moreno Andreo <moreno.andreo@evolu-s.it>)
List pgsql-general
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?

> 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?


> 
> How to REVOKE that non-existing user so pg_upgrade can proceed?
> 
> thanks
> 
> Moreno.-
> 
> 
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Chris Withers
Date:
Subject: why would postgres be throttling a streaming replication slot'ssending?
Next
From: Adrian Klaver
Date:
Subject: Re: Debian : No echo after pg_dump | psql