From 8de72b66a2edcf12c812de0a73bd50b6b7d81d62 Mon Sep 17 00:00:00 2001 From: Simon Riggs Date: Sat, 1 Dec 2012 12:54:20 +0000 Subject: 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 --- src/backend/parser/gram.y | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/backend/parser') 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)); -- cgit v1.2.3