mirror of
https://github.com/postgres/postgres.git
synced 2025-11-03 09:13:20 +03:00
Fix two oversights from 9ebe0572 which refactored cluster_rel
The recheck option became a no-op as ClusterOption failed to set proper values for each element. There was a second code path where local options got overwritten. Both issues have been spotted by Coverity.
This commit is contained in:
@@ -1551,17 +1551,17 @@ vacuum_rel(Oid relid, RangeVar *relation, int options, VacuumParams *params)
|
||||
*/
|
||||
if (options & VACOPT_FULL)
|
||||
{
|
||||
int options = 0;
|
||||
int cluster_options = 0;
|
||||
|
||||
/* close relation before vacuuming, but hold lock until commit */
|
||||
relation_close(onerel, NoLock);
|
||||
onerel = NULL;
|
||||
|
||||
if ((options & VACOPT_VERBOSE) != 0)
|
||||
options |= CLUOPT_VERBOSE;
|
||||
cluster_options |= CLUOPT_VERBOSE;
|
||||
|
||||
/* VACUUM FULL is now a variant of CLUSTER; see cluster.c */
|
||||
cluster_rel(relid, InvalidOid, options);
|
||||
cluster_rel(relid, InvalidOid, cluster_options);
|
||||
}
|
||||
else
|
||||
lazy_vacuum_rel(onerel, options, params, vac_strategy);
|
||||
|
||||
Reference in New Issue
Block a user