aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils')
-rw-r--r--src/backend/utils/cache/plancache.c33
-rw-r--r--src/backend/utils/misc/guc.c10
-rw-r--r--src/backend/utils/misc/postgresql.conf.sample1
3 files changed, 1 insertions, 43 deletions
diff --git a/src/backend/utils/cache/plancache.c b/src/backend/utils/cache/plancache.c
index c1f4128445b..1a0950489d7 100644
--- a/src/backend/utils/cache/plancache.c
+++ b/src/backend/utils/cache/plancache.c
@@ -1735,23 +1735,6 @@ QueryListGetPrimaryStmt(List *stmts)
return NULL;
}
-static void
-AcquireExecutorLocksOnPartitions(List *partitionOids, int lockmode,
- bool acquire)
-{
- ListCell *lc;
-
- foreach(lc, partitionOids)
- {
- Oid partOid = lfirst_oid(lc);
-
- if (acquire)
- LockRelationOid(partOid, lockmode);
- else
- UnlockRelationOid(partOid, lockmode);
- }
-}
-
/*
* AcquireExecutorLocks: acquire locks needed for execution of a cached plan;
* or release them if acquire is false.
@@ -1765,8 +1748,6 @@ AcquireExecutorLocks(List *stmt_list, bool acquire)
{
PlannedStmt *plannedstmt = lfirst_node(PlannedStmt, lc1);
ListCell *lc2;
- Index rti,
- resultRelation = 0;
if (plannedstmt->commandType == CMD_UTILITY)
{
@@ -1784,9 +1765,6 @@ AcquireExecutorLocks(List *stmt_list, bool acquire)
continue;
}
- rti = 1;
- if (plannedstmt->resultRelations)
- resultRelation = linitial_int(plannedstmt->resultRelations);
foreach(lc2, plannedstmt->rtable)
{
RangeTblEntry *rte = (RangeTblEntry *) lfirst(lc2);
@@ -1804,14 +1782,6 @@ AcquireExecutorLocks(List *stmt_list, bool acquire)
LockRelationOid(rte->relid, rte->rellockmode);
else
UnlockRelationOid(rte->relid, rte->rellockmode);
-
- /* Lock partitions ahead of modifying them in parallel mode. */
- if (rti == resultRelation &&
- plannedstmt->partitionOids != NIL)
- AcquireExecutorLocksOnPartitions(plannedstmt->partitionOids,
- rte->rellockmode, acquire);
-
- rti++;
}
}
}
@@ -2020,8 +1990,7 @@ PlanCacheRelCallback(Datum arg, Oid relid)
if (plannedstmt->commandType == CMD_UTILITY)
continue; /* Ignore utility statements */
if ((relid == InvalidOid) ? plannedstmt->relationOids != NIL :
- (list_member_oid(plannedstmt->relationOids, relid) ||
- list_member_oid(plannedstmt->partitionOids, relid)))
+ list_member_oid(plannedstmt->relationOids, relid))
{
/* Invalidate the generic plan only */
plansource->gplan->is_valid = false;
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 3b36a31a475..8bfaa535411 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -1132,16 +1132,6 @@ static struct config_bool ConfigureNamesBool[] =
NULL, NULL, NULL
},
{
- {"enable_parallel_insert", PGC_USERSET, QUERY_TUNING_METHOD,
- gettext_noop("Enables the planner's use of parallel plans for INSERT commands."),
- NULL,
- GUC_EXPLAIN
- },
- &enable_parallel_insert,
- true,
- NULL, NULL, NULL
- },
- {
/* Not for general use --- used by SET SESSION AUTHORIZATION */
{"is_superuser", PGC_INTERNAL, UNGROUPED,
gettext_noop("Shows whether the current user is a superuser."),
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index 86425965d0d..74b416b74a8 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -371,7 +371,6 @@
#enable_partitionwise_aggregate = off
#enable_parallel_hash = on
#enable_partition_pruning = on
-#enable_parallel_insert = on
# - Planner Cost Constants -