From 85efd1a04175951a97b087908121403e4cf4ef7a Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Mon, 19 Nov 2018 11:16:28 -0300 Subject: Disallow COPY FREEZE on partitioned tables This didn't actually work: COPY would fail to flush the right files, and instead would try to flush a non-existing file, causing the whole transaction to fail. Cope by raising an error as soon as the command is sent instead, to avoid a nasty later surprise. Of course, it would be much better to make it work, but we don't have a patch for that yet, and we don't know if we'll want to backpatch one when we do. Reported-by: Tomas Vondra Author: David Rowley Reviewed-by: Amit Langote, Steve Singer, Tomas Vondra --- doc/src/sgml/perform.sgml | 4 ++-- doc/src/sgml/ref/copy.sgml | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/perform.sgml b/doc/src/sgml/perform.sgml index e7f17b9fa9d..e1e65c057e0 100644 --- a/doc/src/sgml/perform.sgml +++ b/doc/src/sgml/perform.sgml @@ -1523,8 +1523,8 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse; needs to be written, because in case of an error, the files containing the newly loaded data will be removed anyway. However, this consideration only applies when - is minimal as all commands - must write WAL otherwise. + is minimal for + non-partitioned tables as all commands must write WAL otherwise. diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml index 732efe69e66..3054123b7fa 100644 --- a/doc/src/sgml/ref/copy.sgml +++ b/doc/src/sgml/ref/copy.sgml @@ -224,7 +224,9 @@ COPY { table_name [ ( COPY FREEZE on + a partitioned table. Note that all other sessions will immediately be able to see the data -- cgit v1.2.3