From: Laurenz Albe <laurenz.albe@cybertec.at>
To: navbarry@gmail.com
To: pgsql-hackers@lists.postgresql.org
Subject: Re: Postgres Partitions Limitations (5.11.2.3)
Date: Fri, 27 Oct 2023 08:58:02 +0200
Message-ID: <40f7af960311be131d6d4bcb2caf7d93b79ddf5c.camel@cybertec.at> (raw)
In-Reply-To: <c8345f6323d6ea9c22e0f44125fd9815081c4c80.camel@cybertec.at>
References: <167299368731.659.16130012959616771853@wrigleys.postgresql.org>
<c8345f6323d6ea9c22e0f44125fd9815081c4c80.camel@cybertec.at>
On Mon, 2023-01-09 at 16:40 +0100, Laurenz Albe wrote:
> > "Using ONLY to add or drop a constraint on only the partitioned table is
> > supported as long as there are no partitions. Once partitions exist, using
> > ONLY will result in an error. Instead, constraints on the partitions
> > themselves can be added and (if they are not present in the parent table)
> > dropped." This seems in contradiction to the example involving adding a
> > unique constraint while minimizing locking at the bottom of "5.11.2.2.
> > Partition Maintenance", which seems to run fine on my local Pg instance:
> >
> > This technique can be used with UNIQUE and PRIMARY KEY constraints too; the
> > indexes are created implicitly when the constraint is created. Example:
>
> No, that is actually an omission in the documentation.
>
> The attached patch tries to improve that.
I am sending a reply to the hackers list, so that I can add the patch to the commitfest.
Yours,
Laurenz Albe
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-docs@postgresql.org
Cc: laurenz.albe@cybertec.at, navbarry@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: Postgres Partitions Limitations (5.11.2.3)
In-Reply-To: <40f7af960311be131d6d4bcb2caf7d93b79ddf5c.camel@cybertec.at>
* 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