pgsql: COPY FREEZE and mark committed on fresh tables.

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: COPY FREEZE and mark committed on fresh tables.
Date: 2012-12-01 12:57:24
Message-ID: E1TemdI-0002Gy-Tu@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/8de72b66a2edcf12c812de0a73bd50b6b7d81d62

Modified Files
--------------
doc/src/sgml/ref/copy.sgml | 23 ++++++++
src/backend/access/heap/heapam.c | 17 +++++-
src/backend/commands/copy.c | 33 +++++++++++
src/backend/parser/gram.y | 4 +
src/backend/utils/mmgr/portalmem.c | 19 ++++++
src/backend/utils/time/snapmgr.c | 9 +++
src/include/access/heapam.h | 2 +
src/include/utils/portal.h | 1 +
src/include/utils/snapmgr.h | 1 +
src/test/regress/expected/copy2.out | 106 +++++++++++++++++++++++++++++++++++
src/test/regress/sql/copy2.sql | 78 +++++++++++++++++++++++++
11 files changed, 292 insertions(+), 1 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2012-12-01 13:36:01 Re: pgsql: COPY FREEZE and mark committed on fresh tables.
Previous Message Peter Eisentraut 2012-12-01 06:56:13 pgsql: doc: Fix broken links to DocBook wiki