pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Assign constraint name when cloning FK definition for partitions 2+ messages / 1 participants [nested] [flat]
* pgsql: Assign constraint name when cloning FK definition for partitions @ 2018-10-06 06:00 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 2+ messages in thread From: Michael Paquier @ 2018-10-06 06:00 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Assign constraint name when cloning FK definition for partitions This is for example used when attaching a partition to a partitioned table which includes foreign keys, and in this case the constraint name has been missing in the data cloned. This could lead to hard crashes, as when validating the foreign key constraint, the constraint name is always expected. Particularly, when using log_min_messages >= DEBUG1, a log message would be generated with this unassigned constraint name, leading to an assertion failure on HEAD. While on it, rename a variable in ATExecAttachPartition which was declared twice with the same name. Author: Michael Paquier Reviewed-by: Álvaro Herrera Discussion: https://postgr.es/m/20181005042236.GG1629@paquier.xyz Backpatch-through: 11 Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c905b67b79b72b88ba80d2486443c824232c6d85 Modified Files -------------- src/backend/catalog/pg_constraint.c | 1 + src/backend/commands/tablecmds.c | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Assign constraint name when cloning FK definition for partitions @ 2018-10-06 06:00 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 2+ messages in thread From: Michael Paquier @ 2018-10-06 06:00 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Assign constraint name when cloning FK definition for partitions This is for example used when attaching a partition to a partitioned table which includes foreign keys, and in this case the constraint name has been missing in the data cloned. This could lead to hard crashes, as when validating the foreign key constraint, the constraint name is always expected. Particularly, when using log_min_messages >= DEBUG1, a log message would be generated with this unassigned constraint name, leading to an assertion failure on HEAD. While on it, rename a variable in ATExecAttachPartition which was declared twice with the same name. Author: Michael Paquier Reviewed-by: Álvaro Herrera Discussion: https://postgr.es/m/20181005042236.GG1629@paquier.xyz Backpatch-through: 11 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/38921d1416c62bb743f6cc5439d0462efefdb286 Modified Files -------------- src/backend/catalog/pg_constraint.c | 1 + src/backend/commands/tablecmds.c | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2018-10-06 06:00 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2018-10-06 06:00 pgsql: Assign constraint name when cloning FK definition for partitions Michael Paquier <michael@paquier.xyz> 2018-10-06 06:00 pgsql: Assign constraint name when cloning FK definition for partitions Michael Paquier <michael@paquier.xyz>
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