pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Michael Paquier <michael@paquier.xyz>
Cc: Stuart <sfbarbee@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Errors creating partitioned tables from existing using (LIKE <table>) after renaming table constraints
Date: Mon, 17 Dec 2018 10:41:07 +0900
Message-ID: <3dcf4d65-313c-b629-86f5-8e06ec42d92f@lab.ntt.co.jp> (raw)
In-Reply-To: <20181216072703.GK5012@paquier.xyz>
References: <2047094.V130LYfLq4@station53.ousa.org>
	<977c72a1-8d56-b77c-37de-808627033654@lab.ntt.co.jp>
	<20181214002038.GC2921@paquier.xyz>
	<d6975ae7-e82a-75d7-fe35-91145cb6265b@lab.ntt.co.jp>
	<20181216072703.GK5012@paquier.xyz>

Hi,

Thanks for reviewing.

On 2018/12/16 16:27, Michael Paquier wrote:
> On Fri, Dec 14, 2018 at 11:19:16AM +0900, Amit Langote wrote:
>> Thank you for looking.  I noticed that the previously posted patch doesn't
>> apply as is to branches before 11, so here are the patches that apply to
>> 9.4 to 10 branches.
> 
> When renaming an attribute, renameatt_internal is in charge of
> invalidating the cache by using CacheInvalidateHeapTuple when running
> the catalog update in CatalogTupleUpdate.
> 
> For constraint renames, we may finish by using RenameConstraintById or
> RenameRelationInternal.  And here the constraint is removed by OID where
> a invalidation happens for the constraint, but not its parent relation.
> In short I agree with your fix and its position, still I think that we
> should add a comment why the invalidation needs to happen, with
> something simple, like "Invalidate relcache so as others can see the new
> constraint name".

Yeah, a comment is indeed needed.

> I'll try to get that committed tomorrow and back-patched appropriately.

Thank you for adding the comment and committing. :)

Regards,
Amit





view thread (12+ messages)  latest in thread

Message-ID: <3dcf4d65-313c-b629-86f5-8e06ec42d92f@lab.ntt.co.jp>
Permalink:  ../3dcf4d65-313c-b629-86f5-8e06ec42d92f@lab.ntt.co.jp/
Also on:    postgresql.org/message-id/3dcf4d65-313c-b629-86f5-8e06ec42d92f@lab.ntt.co.jp

 · 

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-bugs@postgresql.org
  Cc: Langote_Amit_f8@lab.ntt.co.jp, michael@paquier.xyz, sfbarbee@gmail.com
  Subject: Re: Errors creating partitioned tables from existing using (LIKE <table>) after renaming table constraints
  In-Reply-To: <3dcf4d65-313c-b629-86f5-8e06ec42d92f@lab.ntt.co.jp>
  References: <2047094.V130LYfLq4@station53.ousa.org> <977c72a1-8d56-b77c-37de-808627033654@lab.ntt.co.jp> <20181214002038.GC2921@paquier.xyz> <d6975ae7-e82a-75d7-fe35-91145cb6265b@lab.ntt.co.jp> <20181216072703.GK5012@paquier.xyz> <3dcf4d65-313c-b629-86f5-8e06ec42d92f@lab.ntt.co.jp>

* 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