mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Revert "Enable parallel SELECT for "INSERT INTO ... SELECT ..."."
To allow inserts in parallel-mode this feature has to ensure that all the constraints, triggers, etc. are parallel-safe for the partition hierarchy which is costly and we need to find a better way to do that. Additionally, we could have used existing cached information in some cases like indexes, domains, etc. to determine the parallel-safety. List of commits reverted, in reverse chronological order:ed62d3737cDoc: Update description for parallel insert reloption.c8f78b6161Add a new GUC and a reloption to enable inserts in parallel-mode.c5be48f092Improve FK trigger parallel-safety check added by05c8482f7f.e2cda3c20aFix use of relcache TriggerDesc field introduced by commit05c8482f7f.e4e87a32ccFix valgrind issue in commit05c8482f7f.05c8482f7fEnable parallel SELECT for "INSERT INTO ... SELECT ...". Discussion: https://postgr.es/m/E1lMiB9-0001c3-SY@gemulon.postgresql.org
This commit is contained in:
@@ -168,15 +168,6 @@ static relopt_bool boolRelOpts[] =
|
||||
},
|
||||
true
|
||||
},
|
||||
{
|
||||
{
|
||||
"parallel_insert_enabled",
|
||||
"Enables \"parallel insert\" feature for this table",
|
||||
RELOPT_KIND_HEAP | RELOPT_KIND_PARTITIONED,
|
||||
ShareUpdateExclusiveLock
|
||||
},
|
||||
true
|
||||
},
|
||||
/* list terminator */
|
||||
{{NULL}}
|
||||
};
|
||||
@@ -1868,9 +1859,7 @@ default_reloptions(Datum reloptions, bool validate, relopt_kind kind)
|
||||
{"vacuum_index_cleanup", RELOPT_TYPE_BOOL,
|
||||
offsetof(StdRdOptions, vacuum_index_cleanup)},
|
||||
{"vacuum_truncate", RELOPT_TYPE_BOOL,
|
||||
offsetof(StdRdOptions, vacuum_truncate)},
|
||||
{"parallel_insert_enabled", RELOPT_TYPE_BOOL,
|
||||
offsetof(StdRdOptions, parallel_insert_enabled)}
|
||||
offsetof(StdRdOptions, vacuum_truncate)}
|
||||
};
|
||||
|
||||
return (bytea *) build_reloptions(reloptions, validate, kind,
|
||||
@@ -1972,15 +1961,13 @@ build_local_reloptions(local_relopts *relopts, Datum options, bool validate)
|
||||
bytea *
|
||||
partitioned_table_reloptions(Datum reloptions, bool validate)
|
||||
{
|
||||
static const relopt_parse_elt tab[] = {
|
||||
{"parallel_insert_enabled", RELOPT_TYPE_BOOL,
|
||||
offsetof(PartitionedTableRdOptions, parallel_insert_enabled)}
|
||||
};
|
||||
|
||||
/*
|
||||
* There are no options for partitioned tables yet, but this is able to do
|
||||
* some validation.
|
||||
*/
|
||||
return (bytea *) build_reloptions(reloptions, validate,
|
||||
RELOPT_KIND_PARTITIONED,
|
||||
sizeof(PartitionedTableRdOptions),
|
||||
tab, lengthof(tab));
|
||||
0, NULL, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user