Skip to content

Commit effdd3f

Browse files
Add back vacuum_cleanup_index_scale_factor parameter.
Commit 9f3665f removed the vacuum_cleanup_index_scale_factor storage parameter. However, that creates dump/reload hazards when moving across major versions. Add back the vacuum_cleanup_index_scale_factor parameter (though not the GUC of the same name) purely to avoid problems when using tools like pg_upgrade. The parameter remains disabled and undocumented. No backpatch to Postgres 13, since vacuum_cleanup_index_scale_factor was only disabled by REL_13_STABLE's version of master branch commit 9f3665f in the first place -- the parameter already looks like this on REL_13_STABLE. Discussion: https://postgr.es/m/YEm/a3Ko3nKnBuVq@paquier.xyz
1 parent 32fd2b5 commit effdd3f

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

src/backend/access/common/reloptions.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,15 @@ static relopt_real realRelOpts[] =
461461
},
462462
0, -1.0, DBL_MAX
463463
},
464+
{
465+
{
466+
"vacuum_cleanup_index_scale_factor",
467+
"Deprecated B-Tree parameter.",
468+
RELOPT_KIND_BTREE,
469+
ShareUpdateExclusiveLock
470+
},
471+
-1, 0.0, 1e10
472+
},
464473
/* list terminator */
465474
{{NULL}}
466475
};

src/backend/access/nbtree/nbtutils.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2105,6 +2105,8 @@ btoptions(Datum reloptions, bool validate)
21052105
{
21062106
static const relopt_parse_elt tab[] = {
21072107
{"fillfactor", RELOPT_TYPE_INT, offsetof(BTOptions, fillfactor)},
2108+
{"vacuum_cleanup_index_scale_factor", RELOPT_TYPE_REAL,
2109+
offsetof(BTOptions, vacuum_cleanup_index_scale_factor)},
21082110
{"deduplicate_items", RELOPT_TYPE_BOOL,
21092111
offsetof(BTOptions, deduplicate_items)}
21102112

src/include/access/nbtree.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,7 @@ typedef struct BTOptions
10671067
{
10681068
int32 varlena_header_; /* varlena header (do not touch directly!) */
10691069
int fillfactor; /* page fill factor in percent (0..100) */
1070+
float8 vacuum_cleanup_index_scale_factor; /* deprecated */
10701071
bool deduplicate_items; /* Try to deduplicate items? */
10711072
} BTOptions;
10721073

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy