From 1722d5eb05d8e5d2e064cd1798abcae4f296ca9d Mon Sep 17 00:00:00 2001 From: Amit Langote Date: Thu, 22 May 2025 14:17:24 +0900 Subject: Revert "Don't lock partitions pruned by initial pruning" As pointed out by Tom Lane, the patch introduced fragile and invasive design around plan invalidation handling when locking of prunable partitions was deferred from plancache.c to the executor. In particular, it violated assumptions about CachedPlan immutability and altered executor APIs in ways that are difficult to justify given the added complexity and overhead. This also removes the firstResultRels field added to PlannedStmt in commit 28317de72, which was intended to support deferred locking of certain ModifyTable result relations. Reported-by: Tom Lane Discussion: https://postgr.es/m/605328.1747710381@sss.pgh.pa.us --- src/backend/commands/portalcmds.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/backend/commands/portalcmds.c') diff --git a/src/backend/commands/portalcmds.c b/src/backend/commands/portalcmds.c index 4c2ac045224..e7c8171c102 100644 --- a/src/backend/commands/portalcmds.c +++ b/src/backend/commands/portalcmds.c @@ -117,7 +117,6 @@ PerformCursorOpen(ParseState *pstate, DeclareCursorStmt *cstmt, ParamListInfo pa queryString, CMDTAG_SELECT, /* cursor's query is always a SELECT */ list_make1(plan), - NULL, NULL); /*---------- -- cgit v1.2.3