1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-06 00:02:13 +03:00
Files
postgres/src/backend
Michael Paquier 8aad248f7c Block creation of partitions with open references to its parent
When a partition is created as part of a trigger processing, it is
possible that the partition which just gets created changes the
properties of the table the executor of the ongoing command relies on,
causing a subsequent crash.  This has been found possible when for
example using a BEFORE INSERT which creates a new partition for a
partitioned table being inserted to.

Any attempt to do so is blocked when working on a partition, with
regression tests added for both CREATE TABLE PARTITION OF and ALTER
TABLE ATTACH PARTITION.

Reported-by: Dmitry Shalashov
Author: Amit Langote
Reviewed-by: Michael Paquier, Tom Lane
Discussion: https://postgr.es/m/15437-3fe01ee66bd1bae1@postgresql.org
Backpatch-through: 10
2018-11-05 11:04:20 +09:00
..
2017-06-21 15:35:54 -04:00
2017-06-21 15:35:54 -04:00
2018-08-06 20:03:55 +02:00
2017-06-21 15:19:25 -04:00
2018-08-21 15:17:38 +09:00
2017-06-12 15:57:22 -04:00
2018-05-07 11:59:42 -04:00