1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-03 09:13:20 +03:00
Files
postgres/src/backend
Michael Paquier dc3e436b19 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:02 +09:00
..
2018-11-04 11:20:59 -05:00
2018-10-29 12:57:55 +13:00
2018-01-02 23:30:12 -05:00
2018-06-25 12:37:18 +02:00
2018-10-25 09:46:00 +09:00
2018-08-27 09:32:59 +12:00
2018-03-30 17:33:04 -07:00
2018-09-06 11:33:04 +02:00
2018-06-25 12:37:18 +02:00