postgresql/src
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
..
backend Block creation of partitions with open references to its parent 2018-11-05 11:04:02 +09:00
bin Fix spelling errors and typos in comments 2018-11-02 13:56:52 +01:00
common Make spelling of "acknowledgment" consistent 2018-10-15 10:06:45 +02:00
fe_utils Fix lexing of standard multi-character operators in edge cases. 2018-08-23 21:42:40 +01:00
include Fix spelling errors and typos in comments 2018-11-02 13:56:52 +01:00
interfaces Fix spelling errors and typos in comments 2018-11-02 13:56:52 +01:00
makefiles Refactor installation of extension headers. 2018-09-07 14:19:14 +01:00
pl Fix bugs in plpgsql's handling of CALL argument lists. 2018-11-04 13:25:39 -05:00
port Apply unconstify() in more places 2018-10-25 01:02:46 +01:00
template Yet further rethinking of build changes for macOS Mojave. 2018-11-02 18:54:00 -04:00
test Block creation of partitions with open references to its parent 2018-11-05 11:04:02 +09:00
timezone Sync our copy of the timezone library with IANA release tzcode2018g. 2018-10-31 09:47:53 -04:00
tools Fix spelling errors and typos in comments 2018-11-02 13:56:52 +01:00
tutorial Deduplicate "invalid input syntax" messages for various types. 2018-07-22 14:58:01 -07:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Yet further rethinking of build changes for macOS Mojave. 2018-11-02 18:54:00 -04:00
Makefile.shlib Don't build static libraries on Cygwin 2018-10-02 16:46:57 -04:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00