pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: ALTER TABLE .. DETACH PARTITION CONCURRENTLY
Date: Thu, 1 Oct 2020 12:50:39 +0900
Message-ID: <20201001035039.GD8130@paquier.xyz> (raw)
In-Reply-To: <CA+HiwqEo8wrQU6KOCE5xCph-B_=njuP0XMpdYiSfjYPByrtF3Q@mail.gmail.com>
References: <CA+HiwqEJLdJkyxg4RP9YS3eBzxHJ9kzdUnmqrA=9tL19qM7wXg@mail.gmail.com>
	<20200923152321.GA26342@alvherre.pgsql>
	<CA+HiwqEo8wrQU6KOCE5xCph-B_=njuP0XMpdYiSfjYPByrtF3Q@mail.gmail.com>

On Thu, Sep 24, 2020 at 12:51:52PM +0900, Amit Langote wrote:
> Also, I noticed that looking up a parent's partitions via
> RelationBuildPartitionDesc or directly will inspect inhdetached to
> include or exclude partitions, but checking if a child table is a
> partition of a given parent table via get_partition_parent doesn't.
> Now if you fix get_partition_parent() to also take into account
> inhdetached, for example, to return InvalidOid if true, then the
> callers would need to not consider the child table a valid partition.
> So, RelationGetPartitionQual() on a detached partition should actually
> return NIL, making my earlier claim about not needing the defensive
> CHECK constraint invalid.  But maybe that's fine if all places agree
> on a detached partition not being a valid partition anymore?

It would be good to get that answered, and while on it please note
that the patch needs a rebase.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../20201001035039.GD8130@paquier.xyz/2-signature.asc)
  download

view thread (87+ messages)  latest in thread

Message-ID: <20201001035039.GD8130@paquier.xyz>
Permalink:  ../20201001035039.GD8130@paquier.xyz/
Also on:    postgresql.org/message-id/20201001035039.GD8130@paquier.xyz

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: michael@paquier.xyz, amitlangote09@gmail.com, alvherre@2ndquadrant.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: ALTER TABLE .. DETACH PARTITION CONCURRENTLY
  In-Reply-To: <20201001035039.GD8130@paquier.xyz>

* 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