Skip to content

Commit 79e15c7

Browse files
committed
Fix off-by-one in pg_xlogdump -r option.
Because of the bug, -r would not accept the rmgr with the highest ID.
1 parent 035a5e1 commit 79e15c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/pg_xlogdump/pg_xlogdump.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ print_rmgr_list(void)
7575
{
7676
int i;
7777

78-
for (i = 0; i < RM_MAX_ID + 1; i++)
78+
for (i = 0; i <= RM_MAX_ID; i++)
7979
{
8080
printf("%s\n", RmgrDescTable[i].rm_name);
8181
}
@@ -492,7 +492,7 @@ main(int argc, char **argv)
492492
exit(EXIT_SUCCESS);
493493
}
494494

495-
for (i = 0; i < RM_MAX_ID; i++)
495+
for (i = 0; i <= RM_MAX_ID; i++)
496496
{
497497
if (pg_strcasecmp(optarg, RmgrDescTable[i].rm_name) == 0)
498498
{

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