git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 957aa4d)
Fix off-by-one error in pg_waldump, introduced in 5c279a6d350.
Thu, 7 Apr 2022 16:14:49 +0000 (09:14 -0700)
Thu, 7 Apr 2022 16:14:49 +0000 (09:14 -0700)
Per report by Bharath Rupireddy.

Discussion: https://postgr.es/m/CALj2ACX+PWDK2MYjdu8CB1ot7OUSo6kd5-fkkEgduEsTSZjAEw@mail.gmail.com


diff --git a/src/bin/pg_waldump/pg_waldump.c b/src/bin/pg_waldump/pg_waldump.c
index 7d92dcaf87b95ca7252a00eb2a5d70208e23b9cd..30ca7684bd080baae567a504b02043e6ff7b4b02 100644 (file)
--- a/src/bin/pg_waldump/pg_waldump.c
+++ b/src/bin/pg_waldump/pg_waldump.c
@@ -720,7 +720,7 @@ XLogDumpDisplayStats(XLogDumpConfig *config, XLogDumpStats *stats)
* calculate column totals.
*/
- for (ri = 0; ri < RM_MAX_ID; ri++)
+ for (ri = 0; ri <= RM_MAX_ID; ri++)
{
total_count += stats->rmgr_stats[ri].count;
total_rec_len += stats->rmgr_stats[ri].rec_len;
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /