aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/trigger.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-01-12 21:49:19 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-01-12 21:49:19 +0000
commite26b09618b98358d951eb37e48df2ab6f8cb5489 (patch)
tree1590c06dce692cb37a6e4b6bb7c125156427dab2 /src/backend/commands/trigger.c
parent01e2a15adac9e437ac16fd0a6aef427f4eb78aad (diff)
downloadpostgresql-e26b09618b98358d951eb37e48df2ab6f8cb5489.tar.gz
postgresql-e26b09618b98358d951eb37e48df2ab6f8cb5489.zip
Repair "Halloween problem" in EvalPlanQual: a tuple that's been inserted by
our own command (or more generally, xmin = our xact and cmin >= current command ID) should not be seen as good. Else we may try to update rows we already updated. This error was inserted last August while fixing the even bigger problem that the old coding wouldn't see *any* tuples inserted by our own transaction as good. Per report from Euler Taveira de Oliveira.
Diffstat (limited to 'src/backend/commands/trigger.c')
-rw-r--r--src/backend/commands/trigger.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index ec998aa7b9f..a6b75f06d58 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/trigger.c,v 1.177.4.2 2005/08/25 19:44:57 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/trigger.c,v 1.177.4.3 2006/01/12 21:49:16 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1603,7 +1603,8 @@ ltrmark:;
epqslot = EvalPlanQual(estate,
relinfo->ri_RangeTableIndex,
&update_ctid,
- update_xmax);
+ update_xmax,
+ cid);
if (!TupIsNull(epqslot))
{
*tid = update_ctid;