Обсуждение: non-existent user "28"

Поиск
Список
Период
Сортировка

non-existent user "28"

От
"Tamsin"
Дата:
Hi,
when I pg_dump my database, I get lines like:
GRANT SELECT on "tablename" to "28";

When I restore from the dump file, I get errors:
ERROR:  aclparse: non-existent user "28"

The dump file does contain grants for the real users which exist in the
database, and I've checked pg_shadow, and there is no user 28.
I'm not sure how the database got in this state - would this happen when I
drop & recreate a user?  Is there something I can do about this?  I couldn't
see where in the system tables the permission info is stored.

Thanks,
Tamsin



Re: non-existent user "28"

От
Tom Lane
Дата:
"Tamsin" <tg_mail@bryncadfan.co.uk> writes:
> I'm not sure how the database got in this state - would this happen when I
> drop & recreate a user?

Yes.  There's no crosscheck to see if you still have active GRANTs for
the user being deleted.  (Which is bad but that's how it is at the moment.)

> Is there something I can do about this?  I couldn't
> see where in the system tables the permission info is stored.

relacl column of pg_class.

My advice would just be to ignore the errors on restore... that's about
the easiest way to get rid of the dead grants while keeping the good ones.

            regards, tom lane