aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2022-05-18 09:47:38 +0900
committerMichael Paquier <michael@paquier.xyz>2022-05-18 09:47:38 +0900
commit27f1366050c6cd8c1ea5f03b367a5a167ebf34b7 (patch)
treec8ec951e223674f7d235d1ae7c7b0eca4478cba4 /src
parentbbf7c2d9e932db873469cd9cecf0e05e39c1962d (diff)
downloadpostgresql-27f1366050c6cd8c1ea5f03b367a5a167ebf34b7.tar.gz
postgresql-27f1366050c6cd8c1ea5f03b367a5a167ebf34b7.zip
pgbench: Restore compatibility of --partitions=0
A value of 0 is allowed for this option since its creation, that would map with the default of having no partitions for pgbench_accounts, but 6f164e6 broke that by enforcing an error. This commit restores the original behavior. Author: Amit Langote Discussion: https://postgr.es/m/CA+HiwqGAGobiiHR8nH382HJxqm1mzZs8=3oKPXnXivWoFSZmNA@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/bin/pgbench/pgbench.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index 79c0cd374d3..fbb74bdc4c4 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -6865,7 +6865,7 @@ main(int argc, char **argv)
break;
case 11: /* partitions */
initialization_option_set = true;
- if (!option_parse_int(optarg, "--partitions", 1, INT_MAX,
+ if (!option_parse_int(optarg, "--partitions", 0, INT_MAX,
&partitions))
exit(1);
break;