public inbox for [email protected]
help / color / mirror / Atom feedFrom: PG Doc comments form <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Postgres Partitions Limitations (5.11.2.3)
Date: Fri, 06 Jan 2023 08:28:07 +0000
Message-ID: <[email protected]> (raw)
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/15/ddl-partitioning.html
Description:
Link:
https://www.postgresql.org/docs/current/ddl-partitioning.html#DDL-PARTITIONING-DECLARATIVE
"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:
```ALTER TABLE ONLY measurement ADD UNIQUE (city_id, logdate);
ALTER TABLE measurement_y2006m02 ADD UNIQUE (city_id, logdate);
ALTER INDEX measurement_city_id_logdate_key
ATTACH PARTITION measurement_y2006m02_city_id_logdate_key;
...
```
"
I might be misinterpreting something. Sorry if that's the case!
Thanks,
Bryce
view thread (2+ messages)
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: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Postgres Partitions Limitations (5.11.2.3)
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox