pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-hackers@lists.postgresql.org, Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Subject: Re: pgsql: Fix CommandCounterIncrement in partition-related DDL
Date: Tue, 20 Mar 2018 14:37:46 -0400
Message-ID: <21120.1521571066@sss.pgh.pa.us> (raw)
In-Reply-To: <20180320182659.nyzn3vqtjbbtfgwq@alvherre.pgsql>
References: <20180320182659.nyzn3vqtjbbtfgwq@alvherre.pgsql>

Alvaro Herrera <alvherre@alvh.no-ip.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.

			regards, tom lane




view thread (6+ messages)  latest in thread

Message-ID: <21120.1521571066@sss.pgh.pa.us>
Permalink:  ../21120.1521571066@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21120.1521571066@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, jeevan.ladhe@enterprisedb.com, robertmhaas@gmail.com
  Subject: Re: pgsql: Fix CommandCounterIncrement in partition-related DDL
  In-Reply-To: <21120.1521571066@sss.pgh.pa.us>
  References: <20180320182659.nyzn3vqtjbbtfgwq@alvherre.pgsql> <21120.1521571066@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox