Skip to content

Commit 500256d

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 6b71c92 commit 500256d

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
@@ -395,9 +395,11 @@ main(int argc, char *argv[])
395395
break;
396396
case 6:
397397
if (pg_strcasecmp(optarg, "all-visible") == 0)
398-
opts.skip = "all visible";
398+
opts.skip = "all-visible";
399399
else if (pg_strcasecmp(optarg, "all-frozen") == 0)
400-
opts.skip = "all frozen";
400+
opts.skip = "all-frozen";
401+
else if (pg_strcasecmp(optarg, "none") == 0)
402+
opts.skip = "none";
401403
else
402404
{
403405
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