Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9f7ba88

Browse files
committed
Fix two oversights from9ebe057 which refactored cluster_rel
The recheck option became a no-op as ClusterOption failed to set propervalues for each element. There was a second code path where localoptions got overwritten.Both issues have been spotted by Coverity.
1 parente09144e commit9f7ba88

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

‎src/backend/commands/vacuum.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,17 +1551,17 @@ vacuum_rel(Oid relid, RangeVar *relation, int options, VacuumParams *params)
15511551
*/
15521552
if (options&VACOPT_FULL)
15531553
{
1554-
intoptions=0;
1554+
intcluster_options=0;
15551555

15561556
/* close relation before vacuuming, but hold lock until commit */
15571557
relation_close(onerel,NoLock);
15581558
onerel=NULL;
15591559

15601560
if ((options&VACOPT_VERBOSE)!=0)
1561-
options |=CLUOPT_VERBOSE;
1561+
cluster_options |=CLUOPT_VERBOSE;
15621562

15631563
/* VACUUM FULL is now a variant of CLUSTER; see cluster.c */
1564-
cluster_rel(relid,InvalidOid,options);
1564+
cluster_rel(relid,InvalidOid,cluster_options);
15651565
}
15661566
else
15671567
lazy_vacuum_rel(onerel,options,params,vac_strategy);

‎src/include/nodes/parsenodes.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3114,8 +3114,8 @@ typedef struct AlterSystemStmt
31143114
*/
31153115
typedefenumClusterOption
31163116
{
3117-
CLUOPT_RECHECK,/* recheck relation state */
3118-
CLUOPT_VERBOSE/* print progress info */
3117+
CLUOPT_RECHECK=1 <<0,/* recheck relation state */
3118+
CLUOPT_VERBOSE=1 <<1/* print progress info */
31193119
}ClusterOption;
31203120

31213121
typedefstructClusterStmt

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp