Re: Shouldn't pg_(sh)seclabel.provider be marked NOT NULL? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Shouldn't pg_(sh)seclabel.provider be marked NOT NULL?
Date
Msg-id 19501.1403301468@sss.pgh.pa.us
Whole thread Raw
In response to Re: Shouldn't pg_(sh)seclabel.provider be marked NOT NULL?  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> On 2014-06-20 17:29:33 -0400, Tom Lane wrote:
>> I think Alvaro was complaining that it's alone in lacking this comment:
>> /* This following index is not used for a cache and is not unique */
>> 
>> But TBH, I don't think those comments are worth much.  I'd rather get
>> rid of them all and instead add an Assert to the cache code enforcing
>> that any index underlying a catcache is unique.  It looks like the
>> easiest place to do that is InitCatCachePhase2 --- that's the only place
>> in catcache.c that actually opens the underlying index directly.
>> 
>> I'd like to also have an Assert in there that the index columns are
>> marked NOT NULL, but not sure if they actually all are marked that
>> way today.

> Sounds sensible. If they aren't marking them as such hopefully isn't
> problematic...

Experimental result from adding an Assert in CatalogCacheInitializeCache
is that it doesn't blow up :-).  So we do have them all marked correctly.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [BUGS] BUG #8673: Could not open file "pg_multixact/members/xxxx" on slave during hot_standby
Next
From: John Lumby
Date:
Subject: Re: Extended Prefetching using Asynchronous IO - proposal and patch