diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2023-07-03 07:09:22 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2023-07-03 07:18:57 +0200 |
commit | 7a7f60aef8bf86b1a94908e20edd107fa9da4f3d (patch) | |
tree | c721557e084b0f60ddcf310246ad71409e527ec8 /src/backend/commands/statscmds.c | |
parent | 3ee2f25d21faa123dc5bb2886a00a54bdddd1c3e (diff) | |
download | postgresql-7a7f60aef8bf86b1a94908e20edd107fa9da4f3d.tar.gz postgresql-7a7f60aef8bf86b1a94908e20edd107fa9da4f3d.zip |
Add macro for maximum statistics target
The number of places where 10000 was hardcoded had grown a bit beyond
the comfort level. Introduce a macro MAX_STATISTICS_TARGET instead.
Reviewed-by: Tomas Vondra <tomas.vondra@enterprisedb.com>
Discussion: https://www.postgresql.org/message-id/flat/d6069765-5971-04d3-c10d-e4f7b2e9c459%40eisentraut.org
Diffstat (limited to 'src/backend/commands/statscmds.c')
-rw-r--r-- | src/backend/commands/statscmds.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c index c2dab20bdc4..36bc8c33baf 100644 --- a/src/backend/commands/statscmds.c +++ b/src/backend/commands/statscmds.c @@ -619,9 +619,9 @@ AlterStatistics(AlterStatsStmt *stmt) errmsg("statistics target %d is too low", newtarget))); } - else if (newtarget > 10000) + else if (newtarget > MAX_STATISTICS_TARGET) { - newtarget = 10000; + newtarget = MAX_STATISTICS_TARGET; ereport(WARNING, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("lowering statistics target to %d", |