Thread: WARNING: group with ID NNN does not exist

WARNING: group with ID NNN does not exist

From
"Ed L."
Date:
I'm getting the following warning on 8.0beta3:

    WARNING:  group with ID 103 does not exist

It is true that I don't have a pg_group.grosysid = 103,
but I don't understand why the backend expects it in the
first place.  Here's an example:

% psql -c "create user \"root@foobar\""
CREATE USER
% psql -c "select usename, usesysid from pg_user where usename = 'root@foobar'"
   usename   | usesysid
-------------+----------
 root@foobar |      268
(1 row)

% psql -c "alter group perfmon_agent_group add user \"root@foobar\""
ALTER GROUP

% psql -c "select * from pg_group where groname = 'perfmon_agent_group'"
       groname       | grosysid |
                              
                         grolist
                              


---------------------+----------+---------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------
 perfmon_agent_group |      101 |
{196,265,266,197,198,199,200,201,202,203,204,205,206,207,208,267,209,210,211,212,264,213,214,215,216,217,218,219,220

,221,222,223,224,225,226,195,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,249,250,251,252,253,254,255,256,257,2
58,259,260,261,248,268}
(1 row)

% psql -U "root@foobar" -c "insert into measurement_error(host_id, measure_id, error, source_id, local_source_id)
values(37, 23, 'foo', 1, 1)" 
WARNING:  group with ID 103 does not exist
INSERT 111854687 1


Is "root@foobar" and illegal username?  Other ideas?

TIA.

Ed


Re: WARNING: group with ID NNN does not exist

From
Tom Lane
Date:
"Ed L." <pgsql@bluepolka.net> writes:
> I'm getting the following warning on 8.0beta3:
>     WARNING:  group with ID 103 does not exist
> It is true that I don't have a pg_group.grosysid = 103,
> but I don't understand why the backend expects it in the
> first place.

Probably because you had such a group, and dropped it without first
dropping all the permissions it had.  "\z measurement_error" will
likely show a reference to that group.

            regards, tom lane