Re: Thoughts on pg_hba.conf rejection - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Thoughts on pg_hba.conf rejection
Date
Msg-id i2t603c8f071004201512q4235e868t7d8cf376eacb6eee@mail.gmail.com
Whole thread Raw
In response to Re: Thoughts on pg_hba.conf rejection  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Thoughts on pg_hba.conf rejection  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Thoughts on pg_hba.conf rejection  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Apr 20, 2010 at 5:51 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Tue, Apr 20, 2010 at 5:02 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Robert Haas <robertmhaas@gmail.com> writes:
>>> On Tue, Apr 20, 2010 at 2:24 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>>> 3. We'd have to nail pg_authid, pg_auth_members, and their indexes into
>>>> relcache, because relcache.c isn't prepared to cope otherwise.  I doubt
>>>> this would affect performance in any material way, but it would eat a
>>>> few more kbytes of storage per backend.
>>
>>> Hmm, I'm not sure I understand why this is necessary or what our other
>>> options are.
>>
>> relcache.c assumes that "critical" relations (those for which we have
>> hard-wired descriptors in schemapg.h) are always nailed-in-cache.  In
>> the general case this is necessary because we'd not be able to rebuild
>> the cache entry if it got discarded; eg, without a pg_class entry you're
>> dead in the water.  It's possible we could decouple these attributes;
>> for instance develop a notion of being nailed only until authentication
>> finishes, or something like that.  I'm not thinking it's worth it
>> though.
>
> Well that just begs the question - why do we need a hard-wired
> descriptor?  Presumably we should only need to hard-wired descriptors
> for the relations are used by the relcache code itself to build more
> descriptors - so clearly pg_cache and pg_attribute, but beyond that I
> don't get it.  In particular, I can't see any reason why we couldn't
> just build the descriptor for pg_authid etc. by scanning pg_class and
> pg_attribute.

I suppose the problem here is that pg_attribute and pg_class are not
shared catalogs, so we can't read them without selecting a database.
What about making a fake version of these relations that includes only
the shared catalogs?

...Robert


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Thoughts on pg_hba.conf rejection
Next
From: Alvaro Herrera
Date:
Subject: Re: Thoughts on pg_hba.conf rejection