Re: should ConstraintRelationId ins/upd cause relcache invals? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: should ConstraintRelationId ins/upd cause relcache invals?
Date
Msg-id 22800.1548112471@sss.pgh.pa.us
Whole thread Raw
In response to Re: should ConstraintRelationId ins/upd cause relcache invals?  (Andres Freund <andres@anarazel.de>)
Responses Re: should ConstraintRelationId ins/upd cause relcache invals?  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> Given https://www.postgresql.org/message-id/20190121193300.gknn7p4pmmjg7nqf%40alap3.anarazel.de
> and the concerns voiced in the thread quoted therein, I'm a bit
> surprised that you just went ahead with this, and backpatched it to boot.

I don't think that's relevant.  The issues there were about whether
a pg_index row update ought to cause an invalidation of the relcache
entry for the index's table (not the one for the index, which it
already takes care of).  That seems very questionable to me --- the
potentially-invalidatable info ought to be in the index's relcache entry,
not its parent table's entry, IMO.  Here, however, it's clear which
relcache entry is dependent on those pg_constraint rows (as long as Alvaro
got it right about whether to inval conrelid or confrelid ...), and
that it is indeed so dependent.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: problems with foreign keys on partitioned tables
Next
From: Andres Freund
Date:
Subject: Re: Changing SQL Inlining Behaviour (or...?)