diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-20 18:37:02 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-20 18:37:02 +0000 |
commit | b95ae32b4178959e8880bd716fb33ec163f61713 (patch) | |
tree | 316fdc43f11fb9f859d4d9721287f85b9b44db68 /src/include | |
parent | 1bfdd1a89321c390201ebe15fe47571f54f9c80a (diff) | |
download | postgresql-b95ae32b4178959e8880bd716fb33ec163f61713.tar.gz postgresql-b95ae32b4178959e8880bd716fb33ec163f61713.zip |
Avoid WAL-logging individual tuple insertions during CREATE TABLE AS
(a/k/a SELECT INTO). Instead, flush and fsync the whole relation before
committing. We do still need the WAL log when PITR is active, however.
Simon Riggs and Tom Lane.
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/access/heapam.h | 5 | ||||
-rw-r--r-- | src/include/access/hio.h | 4 | ||||
-rw-r--r-- | src/include/nodes/execnodes.h | 4 |
3 files changed, 8 insertions, 5 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index 151a62f9b68..dde6fe8ecd8 100644 --- a/src/include/access/heapam.h +++ b/src/include/access/heapam.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.101 2005/06/06 17:01:24 tgl Exp $ + * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.102 2005/06/20 18:37:01 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -156,7 +156,8 @@ extern ItemPointer heap_get_latest_tid(Relation relation, Snapshot snapshot, ItemPointer tid); extern void setLastTid(const ItemPointer tid); -extern Oid heap_insert(Relation relation, HeapTuple tup, CommandId cid); +extern Oid heap_insert(Relation relation, HeapTuple tup, CommandId cid, + bool use_wal, bool use_fsm); extern HTSU_Result heap_delete(Relation relation, ItemPointer tid, ItemPointer ctid, CommandId cid, Snapshot crosscheck, bool wait); extern HTSU_Result heap_update(Relation relation, ItemPointer otid, HeapTuple tup, diff --git a/src/include/access/hio.h b/src/include/access/hio.h index 49091eb202f..e706fea4ca1 100644 --- a/src/include/access/hio.h +++ b/src/include/access/hio.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/hio.h,v 1.27 2004/12/31 22:03:21 pgsql Exp $ + * $PostgreSQL: pgsql/src/include/access/hio.h,v 1.28 2005/06/20 18:37:01 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -19,6 +19,6 @@ extern void RelationPutHeapTuple(Relation relation, Buffer buffer, HeapTuple tuple); extern Buffer RelationGetBufferForTuple(Relation relation, Size len, - Buffer otherBuffer); + Buffer otherBuffer, bool use_fsm); #endif /* HIO_H */ diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 19f264119c3..df41c856108 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.134 2005/06/15 07:27:44 neilc Exp $ + * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.135 2005/06/20 18:37:02 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -304,7 +304,9 @@ typedef struct EState ResultRelInfo *es_result_relation_info; /* currently active array * elt */ JunkFilter *es_junkFilter; /* currently active junk filter */ + Relation es_into_relation_descriptor; /* for SELECT INTO */ + bool es_into_relation_use_wal; /* Parameter info: */ ParamListInfo es_param_list_info; /* values of external params */ |