From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org, Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | Re: pgsql: Fix CommandCounterIncrement in partition-related DDL |
Date: | 2018-03-20 18:55:29 |
Message-ID: | 20180320185529.sf3wym5gdfnczd4m@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Tom Lane wrote:
> Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> > I wonder about adding a syscache callback so that when an item in
> > pg_partitioned_table is invalidated, the relcache entry for partrelid
> > entry in pg_class is invalidated also. I can't find any precedent for
> > anything similar, though, and there doesn't seem to be any convenient
> > place to do it, either.
>
> In principle you could do it by adding logic to CacheInvalidateHeapTuple
> in inval.c, similar to the existing logic for pg_class, pg_attribute
> and pg_index entries. Not sure it's worthwhile though. That's very
> ancient code; of late our practice has been to insist that the code
> modifying other catalogs that feed into relcache entries should issue
> a relcache inval explicitly. If there's a reason why it's not convenient
> to do that, then maybe making CacheInvalidateHeapTuple do it is a
> good way.
Actually, the current code uses CacheInvalidateRelcache() already and it
seems to work; I was looking for a better way that did not require us to
remember it for every update in that catalog, but it seems there isn't
one.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-03-20 19:16:23 | pgsql: Make configure check for a couple more Perl modules for --enable |
Previous Message | Tom Lane | 2018-03-20 18:37:46 | Re: pgsql: Fix CommandCounterIncrement in partition-related DDL |
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2018-03-20 18:59:02 | Re: [HACKERS] plpgsql - additional extra checks |
Previous Message | Alvaro Herrera | 2018-03-20 18:50:38 | Re: configure's checks for --enable-tap-tests are insufficient |