Skip to content

Commit 77c7507

Browse files
committed
Fix oversight in new EvalPlanQual logic: the second loop over the ExecRowMark
list in ExecLockRows() forgot to allow for the possibility that some of the rowmarks are for child tables that aren't relevant to the current row. Per report from Kenichiro Tanaka.
1 parent 2dbbda0 commit 77c7507

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/backend/executor/nodeLockRows.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/executor/nodeLockRows.c,v 1.5 2010/07/12 17:01:05 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/executor/nodeLockRows.c,v 1.6 2010/07/28 17:21:56 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -195,6 +195,13 @@ ExecLockRows(LockRowsState *node)
195195
HeapTupleData tuple;
196196
Buffer buffer;
197197

198+
/* ignore non-active child tables */
199+
if (!ItemPointerIsValid(&(erm->curCtid)))
200+
{
201+
Assert(erm->rti != erm->prti); /* check it's child table */
202+
continue;
203+
}
204+
198205
if (EvalPlanQualGetTuple(&node->lr_epqstate, erm->rti) != NULL)
199206
continue; /* it was updated and fetched above */
200207

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy