Re: Shouldn't pg_(sh)seclabel.provider be marked NOT NULL?

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Shouldn't pg_(sh)seclabel.provider be marked NOT NULL?
Date: 2014-06-20 21:36:45
Message-ID: 20140620213645.GG30721@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-06-20 17:29:33 -0400, Tom Lane wrote:
> Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> > On 2014-06-20 16:50:15 -0400, Alvaro Herrera wrote:
> >> Non-unique indexes in indexing.h
> >> already bear a standard comment that they are not used for syscache.
> >> The only exception was added recently in f01d1ae3a104019:
> >> DECLARE_INDEX(pg_class_tblspc_relfilenode_index, 3455, on pg_class using btree(reltablespace oid_ops, relfilenode oid_ops));
>
> > There's no NULLs in here. It can have duplicates, but in that it's far
> > from alone.
>
> 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...

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-06-20 21:38:16 Re: [BUGS] BUG #8673: Could not open file "pg_multixact/members/xxxx" on slave during hot_standby
Previous Message Tom Lane 2014-06-20 21:29:33 Re: Shouldn't pg_(sh)seclabel.provider be marked NOT NULL?