| From: | vellaipandiyan sm <vellaipandiyan(dot)sm(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Review comments on createPartitions() in pgbench.c |
| Date: | 2026-05-15 04:15:42 |
| Message-ID: | CAGXjcjmT=UC2Z_Uhr+NcjCUY081c2xXpE5ReLFy_xqzKcG94WQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello developer people,
I was reviewing the createPartitions() function in pgbench.c and noticed a
few potential robustness concerns that may be worth reviewing.
Observations:
-
possible overflow readability concern in the part_size calculation
-
reliance on Assert(partitions > 0) for runtime safety
-
PQExpBuffer reuse without explicit resetPQExpBuffer()
-
possible edge-case considerations for uneven RANGE partition boundaries
I have not yet reproduced a failure case, so these are currently review
observations rather than confirmed bugs.
Possible improvement for the calculation section:
int64 total = (int64) naccounts * scale;
int64 part_size = (total + partitions - 1) / partitions;
Thank you for your work on PostgreSQL.
Regards,
Vellaipandiyan
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2026-05-15 04:29:53 | Re: postgres_fdw: use_scram_passthrough on user mapping is ignored when also set on server |
| Previous Message | Ayush Tiwari | 2026-05-15 04:00:08 | Re: [PATCH] Rebuild CHECK constraints after generated column SET EXPRESSION |