aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2012-12-01 12:54:20 +0000
committerSimon Riggs <simon@2ndQuadrant.com>2012-12-01 12:54:20 +0000
commit8de72b66a2edcf12c812de0a73bd50b6b7d81d62 (patch)
tree3cb4fc55c3d70b7b972910cfeb22cbb7c704875a /src/backend/parser
parent44c03efee3d15a1db3d64bc5a2da91c145a91873 (diff)
downloadpostgresql-8de72b66a2edcf12c812de0a73bd50b6b7d81d62.tar.gz
postgresql-8de72b66a2edcf12c812de0a73bd50b6b7d81d62.zip
COPY FREEZE and mark committed on fresh tables.
When a relfilenode is created in this subtransaction or a committed child transaction and it cannot otherwise be seen by our own process, mark tuples committed ahead of transaction commit for all COPY commands in same transaction. If FREEZE specified on COPY and pre-conditions met then rows will also be frozen. Both options designed to avoid revisiting rows after commit, increasing performance of subsequent commands after data load and upgrade. pg_restore changes later. Simon Riggs, review comments from Heikki Linnakangas, Noah Misch and design input from Tom Lane, Robert Haas and Kevin Grittner
Diffstat (limited to 'src/backend/parser')
-rw-r--r--src/backend/parser/gram.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index e4ff76e66e0..ad98b364f13 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -2383,6 +2383,10 @@ copy_opt_item:
{
$$ = makeDefElem("oids", (Node *)makeInteger(TRUE));
}
+ | FREEZE
+ {
+ $$ = makeDefElem("freeze", (Node *)makeInteger(TRUE));
+ }
| DELIMITER opt_as Sconst
{
$$ = makeDefElem("delimiter", (Node *)makeString($3));