Thread: pgsql: COPY FREEZE and mark committed on fresh tables.

pgsql: COPY FREEZE and mark committed on fresh tables.

From
Simon Riggs
Date:
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(-)


Re: pgsql: COPY FREEZE and mark committed on fresh tables.

From
Andrew Dunstan
Date:
On 12/01/2012 07:57 AM, Simon Riggs wrote:
> COPY FREEZE and mark committed on fresh tables.
>
> http://git.postgresql.org/pg/commitdiff/8de72b66a2edcf12c812de0a73bd50b6b7d81d62
>

Looks like this has broken the buildfarm.

cheers

andrew



Re: pgsql: COPY FREEZE and mark committed on fresh tables.

From
Simon Riggs
Date:
On 1 December 2012 13:36, Andrew Dunstan <andrew@dunslane.net> wrote:
>
> On 12/01/2012 07:57 AM, Simon Riggs wrote:
>>
>> COPY FREEZE and mark committed on fresh tables.
>>
>>
>> http://git.postgresql.org/pg/commitdiff/8de72b66a2edcf12c812de0a73bd50b6b7d81d62
>>
>
> Looks like this has broken the buildfarm.

Yes, I'm fixing now.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services