Re: empty role names in pg_dumpall output - Mailing list pgsql-general

From Tom Lane
Subject Re: empty role names in pg_dumpall output
Date
Msg-id 23200.1335547412@sss.pgh.pa.us
Whole thread Raw
In response to Re: empty role names in pg_dumpall output  (Filip Rembiałkowski <filip.rembialkowski@gmail.com>)
Responses Re: empty role names in pg_dumpall output  (Filip Rembiałkowski <filip.rembialkowski@gmail.com>)
List pgsql-general
=?UTF-8?Q?Filip_Rembia=C5=82kowski?= <filip.rembialkowski@gmail.com> writes:
> On Wed, Apr 25, 2012 at 8:56 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> 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.

> Yes that is the case:

Ah-ha.  How about the member and grantor OIDs in those rows --- do
they correspond to still-existing roles?  (I believe "10" would be
the bootstrap superuser, so that should certainly still exist, but
those other numbers are for user-made roles.)

> Could it be (theoretically) caused by human-made insertions into
> pg_auth_members?

Well, perhaps ... are you in the habit of hacking that catalog directly?
Aside from the possibility of inserting a just-plain-wrong OID, there's
the possibility of inserting a valid row but forgetting to add a
pg_shdepend entry that would protect the row against the underlying
role being dropped.

> Maybe you remember some bug which could have caused this in the past?

Doesn't ring a bell offhand.

            regards, tom lane

pgsql-general by date:

Previous
From: leaf_yxj
Date:
Subject: Re: how to set up automatically startup database when the server boot or reboot.
Next
From: savio rodriges
Date:
Subject: ...