aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2012-12-07 12:59:05 +0000
committerSimon Riggs <simon@2ndQuadrant.com>2012-12-07 12:59:05 +0000
commit1eb6cee499d19fc9204e059ba37fc2dac32e2f25 (patch)
tree23eb7ca24a98a04a6fb03fba61bd1607fce48a56 /src/backend/commands
parent31a891857a128828d47d93c63e041f3b69cbab70 (diff)
downloadpostgresql-1eb6cee499d19fc9204e059ba37fc2dac32e2f25.tar.gz
postgresql-1eb6cee499d19fc9204e059ba37fc2dac32e2f25.zip
Clarify that COPY FREEZE is not a hard rule.
Remove message when FREEZE not honoured, clarify reasons in comments and docs.
Diffstat (limited to 'src/backend/commands')
-rw-r--r--src/backend/commands/copy.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index 09f40667f68..c4104e4d9d5 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -1993,6 +1993,11 @@ CopyFrom(CopyState cstate)
* after xact cleanup. Note that the stronger test of exactly
* which subtransaction created it is crucial for correctness
* of this optimisation.
+ *
+ * Note that because the test is unreliable in case of relcache reset
+ * we cannot guarantee that we can honour the request to FREEZE.
+ * If we cannot honour the request we do so silently, firstly to
+ * avoid noise for the user and also to avoid obscure test failures.
*/
if (cstate->freeze &&
ThereAreNoPriorRegisteredSnapshots() &&
@@ -2001,11 +2006,6 @@ CopyFrom(CopyState cstate)
hi_options |= HEAP_INSERT_FROZEN;
}
- if (cstate->freeze && (hi_options & HEAP_INSERT_FROZEN) == 0)
- ereport(NOTICE,
- (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("FREEZE option specified but pre-conditions not met")));
-
/*
* We need a ResultRelInfo so we can use the regular executor's
* index-entry-making machinery. (There used to be a huge amount of code