aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-11-20 18:38:42 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-11-20 18:38:42 +0000
commitc8de36352fe72ae2265eb53a6e1bf334e4f24888 (patch)
treeba20f28246ebd1455098bddcfad96cc906f9021c /src/backend/executor
parentefd2ae8f19c874137c209f7a3b549d47edb387c0 (diff)
downloadpostgresql-c8de36352fe72ae2265eb53a6e1bf334e4f24888.tar.gz
postgresql-c8de36352fe72ae2265eb53a6e1bf334e4f24888.zip
Modify tuptoaster's API so that it does not try to modify the passed
tuple in-place, but instead passes back an all-new tuple structure if any changes are needed. This is a much cleaner and more robust solution for the bug discovered by Alexey Beschiokov; accordingly, revert the quick hack I installed yesterday. With this change, HeapTupleData.t_datamcxt is no longer needed; will remove it in a separate commit in HEAD only.
Diffstat (limited to 'src/backend/executor')
-rw-r--r--src/backend/executor/execMain.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index 4e828e82953..32c7711664d 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -26,7 +26,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.256.2.2 2005/11/19 20:58:42 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.256.2.3 2005/11/20 18:38:42 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1446,16 +1446,6 @@ ExecInsert(TupleTableSlot *slot,
setLastTid(&(tuple->t_self));
/*
- * KLUGE SOLUTION for bug found post 8.1 release: if the tuple toaster
- * fired on the tuple then it changed the physical tuple inside the
- * tuple slot, leaving any extracted information invalid. Mark the
- * extracted state invalid just in case. Need to fix things so that
- * the toaster gets to run against the tuple before we materialize it,
- * but that's way too invasive for a stable branch.
- */
- slot->tts_nvalid = 0;
-
- /*
* insert index entries for tuple
*/
if (resultRelInfo->ri_NumIndices > 0)
@@ -1710,16 +1700,6 @@ lreplace:;
(estate->es_processed)++;
/*
- * KLUGE SOLUTION for bug found post 8.1 release: if the tuple toaster
- * fired on the tuple then it changed the physical tuple inside the
- * tuple slot, leaving any extracted information invalid. Mark the
- * extracted state invalid just in case. Need to fix things so that
- * the toaster gets to run against the tuple before we materialize it,
- * but that's way too invasive for a stable branch.
- */
- slot->tts_nvalid = 0;
-
- /*
* Note: instead of having to update the old index tuples associated with
* the heap tuple, all we do is form and insert new index tuples. This is
* because UPDATEs are actually DELETEs and INSERTs, and index tuple