diff options
author | Amit Langote <amitlan@postgresql.org> | 2025-05-22 14:17:24 +0900 |
---|---|---|
committer | Amit Langote <amitlan@postgresql.org> | 2025-05-22 17:02:35 +0900 |
commit | 1722d5eb05d8e5d2e064cd1798abcae4f296ca9d (patch) | |
tree | 6661dfcd476b8e355f4f05d38badbe1c6de2ed36 /src/include/executor/execdesc.h | |
parent | f3622b64762bb5ee5242937f0fadcacb1a10f30e (diff) |
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 <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/605328.1747710381@sss.pgh.pa.us
Diffstat (limited to 'src/include/executor/execdesc.h')
-rw-r--r-- | src/include/executor/execdesc.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/include/executor/execdesc.h b/src/include/executor/execdesc.h index ba53305ad42..86db3dc8d0d 100644 --- a/src/include/executor/execdesc.h +++ b/src/include/executor/execdesc.h @@ -35,7 +35,6 @@ typedef struct QueryDesc /* These fields are provided by CreateQueryDesc */ CmdType operation; /* CMD_SELECT, CMD_UPDATE, etc. */ PlannedStmt *plannedstmt; /* planner's output (could be utility, too) */ - CachedPlan *cplan; /* CachedPlan that supplies the plannedstmt */ const char *sourceText; /* source text of the query */ Snapshot snapshot; /* snapshot to use for query */ Snapshot crosscheck_snapshot; /* crosscheck for RI update/delete */ @@ -58,7 +57,6 @@ typedef struct QueryDesc /* in pquery.c */ extern QueryDesc *CreateQueryDesc(PlannedStmt *plannedstmt, - CachedPlan *cplan, const char *sourceText, Snapshot snapshot, Snapshot crosscheck_snapshot, |