Thread: nonexistent user in pg_class.relacl messing pg_dump output

nonexistent user in pg_class.relacl messing pg_dump output

From
Filip Rembiałkowski
Date:
Hi all,

I observed this strange data error:

In pg_dump output, I found such line, which is causing error upon restore:
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE addresshistory TO "158755274";

It appears that pg_class.relacl column has this literally typed in:
dev=# select count(*) from pg_class c JOIN pg_namespace n ON n.oid =
c.relnamespace
where c.relkind='r' and n.nspname='userdata' and
array_to_string(c.relacl,',') ~ '158755274=arwd/';
 count
-------
     5
(1 row)

If I try to clean things up "by hand", with REVOKE - errors
dev=# revoke all on userdata.addresshistory from "158755274";
ERROR:  role "158755274" does not exist

Basically, my questions are

1) was there any bug in 9.0 that could cause this?
2) can you get such mess by playing with system catalogs?

Version tag:
 PostgreSQL 9.0.10 on x86_64-unknown-linux-gnu, compiled by GCC gcc
(SUSE Linux) 4.5.1 20101208 [gcc-4_5-branch revision 167585], 64-bit

Thanks