Commit 5310c61e authored by Daniel Gustafsson's avatar Daniel Gustafsson

Fix pg_amcheck --skip option parameter handling

The skip options set for all-visible and all-frozen were incorrect
as they used space rather than hyphen, causing a syntax error when
invoked. Also, the option for not skipping any pages at all, none,
was documented but not implemented.

Backpatch through 14 where pg_amcheck was introduced.

Bug: #17149
Reported-by: default avatarChen Jiaoqian <chenjq.jy@fujitsu.com>
Reviewed-by: default avatarMasahiko Sawada <sawada.mshk@gmail.com>
Discussion: https://postgr.es/m/17149-5918ea748da36b15@postgresql.org
Backpatch-through: 14
parent 8f51ee63
......@@ -397,9 +397,11 @@ main(int argc, char *argv[])
break;
case 6:
if (pg_strcasecmp(optarg, "all-visible") == 0)
opts.skip = "all visible";
opts.skip = "all-visible";
else if (pg_strcasecmp(optarg, "all-frozen") == 0)
opts.skip = "all frozen";
opts.skip = "all-frozen";
else if (pg_strcasecmp(optarg, "none") == 0)
opts.skip = "none";
else
{
pg_log_error("invalid argument for option %s", "--skip");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment