Re: empty role names in pg_dumpall output

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Filip Rembiałkowski <filip(dot)rembialkowski(at)gmail(dot)com>
Cc: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: empty role names in pg_dumpall output
Date: 2012-04-26 03:56:32
Message-ID: 22271.1335412592@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?UTF-8?Q?Filip_Rembia=C5=82kowski?= <filip(dot)rembialkowski(at)gmail(dot)com> writes:
> PostgreSQL 9.0.4

> I have this in pg_dumpall -g output (non-empty role names changed):

> GRANT "" TO a GRANTED BY postgres;
> GRANT "" TO b GRANTED BY c;
> GRANT "" TO b GRANTED BY c;
> GRANT "" TO b GRANTED BY c;
> GRANT "" TO b GRANTED BY c;
> GRANT "" TO "" GRANTED BY c;
> GRANT "" TO "" GRANTED BY postgres;
> GRANT "" TO "" GRANTED BY postgres;

Hmm. A look at the code in pg_dumpall suggests that the problem is
unmatched entries in pg_auth_members, ie this query:

SELECT ur.rolname AS roleid
FROM pg_auth_members a LEFT JOIN pg_authid ur on ur.oid = a.roleid

is returning some null results. You might look into that catalog
and see if you can figure out what happened.

As far as making the problem go away is concerned, deleting the bogus
pg_auth_members rows should do it; but it would be a good idea to try to
figure out what happened first.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Toby Corkindale 2012-04-26 05:09:38 Re: Bug? Query plans / EXPLAIN using gigabytes of memory
Previous Message Tom Lane 2012-04-26 03:11:51 Re: Bug? Query plans / EXPLAIN using gigabytes of memory