aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2012-12-02 20:52:52 +0000
committerSimon Riggs <simon@2ndQuadrant.com>2012-12-02 20:52:52 +0000
commit5457a130d3a66db807d1e0ee2b8e829321809b83 (patch)
treead4eff3fe8a04395e6ea87accc39b1ea66adbb2f /src/backend/access
parent3114cb60a1a3f482724adaed4ca17572c5e6bde7 (diff)
downloadpostgresql-5457a130d3a66db807d1e0ee2b8e829321809b83.tar.gz
postgresql-5457a130d3a66db807d1e0ee2b8e829321809b83.zip
Reduce scope of changes for COPY FREEZE.
Allow support only for freezing tuples by explicit command. Previous coding mistakenly extended slightly beyond what was agreed as correct on -hackers. So essentially a partial revoke of earlier work, leaving just the COPY FREEZE command.
Diffstat (limited to 'src/backend/access')
-rw-r--r--src/backend/access/heap/heapam.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index b66e26bebff..74c41fac3e9 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -1875,13 +1875,11 @@ FreeBulkInsertState(BulkInsertState bistate)
* The HEAP_INSERT_SKIP_FSM option is passed directly to
* RelationGetBufferForTuple, which see for more info.
*
- * HEAP_INSERT_COMMITTED should only be specified for inserts into
+ * HEAP_INSERT_FROZEN should only be specified for inserts into
* relfilenodes created during the current subtransaction and when
* there are no prior snapshots or pre-existing portals open.
- *
- * HEAP_INSERT_FROZEN only has meaning when HEAP_INSERT_COMMITTED is
- * also set. This causes rows to be frozen, which is an MVCC violation
- * and requires explicit options chosen by user.
+ * This causes rows to be frozen, which is an MVCC violation and
+ * requires explicit options chosen by user.
*
* Note that these options will be applied when inserting into the heap's
* TOAST table, too, if the tuple requires any out-of-line data.
@@ -2086,11 +2084,10 @@ heap_prepare_insert(Relation relation, HeapTuple tup, TransactionId xid,
tup->t_data->t_infomask &= ~(HEAP_XACT_MASK);
tup->t_data->t_infomask2 &= ~(HEAP2_XACT_MASK);
tup->t_data->t_infomask |= HEAP_XMAX_INVALID;
- if (options & HEAP_INSERT_COMMITTED)
+ if (options & HEAP_INSERT_FROZEN)
{
tup->t_data->t_infomask |= HEAP_XMIN_COMMITTED;
- if (options & HEAP_INSERT_FROZEN)
- HeapTupleHeaderSetXmin(tup->t_data, FrozenTransactionId);
+ HeapTupleHeaderSetXmin(tup->t_data, FrozenTransactionId);
}
else
HeapTupleHeaderSetXmin(tup->t_data, xid);