Skip to content

Commit 5310c61

Browse files
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: Chen Jiaoqian <chenjq.jy@fujitsu.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/17149-5918ea748da36b15@postgresql.org Backpatch-through: 14
1 parent 8f51ee6 commit 5310c61

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/bin/pg_amcheck/pg_amcheck.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,11 @@ main(int argc, char *argv[])
397397
break;
398398
case 6:
399399
if (pg_strcasecmp(optarg, "all-visible") == 0)
400-
opts.skip = "all visible";
400+
opts.skip = "all-visible";
401401
else if (pg_strcasecmp(optarg, "all-frozen") == 0)
402-
opts.skip = "all frozen";
402+
opts.skip = "all-frozen";
403+
else if (pg_strcasecmp(optarg, "none") == 0)
404+
opts.skip = "none";
403405
else
404406
{
405407
pg_log_error("invalid argument for option %s", "--skip");

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