mirror of
https://github.com/postgres/postgres.git
synced 2025-06-05 00:02:04 -04:00
Fix off-by-one in pg_xlogdump -r option.
Because of the bug, -r would not accept the rmgr with the highest ID.
This commit is contained in:
parent
035a5e1e8c
commit
79e15c7d86
@ -75,7 +75,7 @@ print_rmgr_list(void)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < RM_MAX_ID + 1; i++)
|
for (i = 0; i <= RM_MAX_ID; i++)
|
||||||
{
|
{
|
||||||
printf("%s\n", RmgrDescTable[i].rm_name);
|
printf("%s\n", RmgrDescTable[i].rm_name);
|
||||||
}
|
}
|
||||||
@ -492,7 +492,7 @@ main(int argc, char **argv)
|
|||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < RM_MAX_ID; i++)
|
for (i = 0; i <= RM_MAX_ID; i++)
|
||||||
{
|
{
|
||||||
if (pg_strcasecmp(optarg, RmgrDescTable[i].rm_name) == 0)
|
if (pg_strcasecmp(optarg, RmgrDescTable[i].rm_name) == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user