From a6cc7db9a67663d59ceb6328d2b0ccea7b384ef6 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 12 Jan 2006 21:49:41 +0000 Subject: 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. --- src/backend/commands/trigger.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/backend/commands/trigger.c') diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index 125a9d2063e..3a4818eeeb9 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 - * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.136.2.3 2005/08/26 20:07:15 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.136.2.4 2006/01/12 21:49:40 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1385,7 +1385,8 @@ ltrmark:; epqslot = EvalPlanQual(estate, relinfo->ri_RangeTableIndex, &update_ctid, - update_xmax); + update_xmax, + cid); if (!TupIsNull(epqslot)) { *tid = update_ctid; -- cgit v1.2.3