|
375 | 375 | # are quiet.
|
376 | 376 | #
|
377 | 377 | $node->command_checks_all(
|
378 |
| - [ @cmd, 'db1', '-t', 's1.*', '--no-dependent-indexes' ], |
| 378 | + [ @cmd, '-t', 's1.*', '--no-dependent-indexes', 'db1' ], |
379 | 379 | 0,
|
380 | 380 | [ $no_output_re ],
|
381 | 381 | [ $no_output_re ],
|
|
384 | 384 | # Checking db2.s1 should show table corruptions if indexes are excluded
|
385 | 385 | #
|
386 | 386 | $node->command_checks_all(
|
387 |
| - [ @cmd, 'db2', '-t', 's1.*', '--no-dependent-indexes' ], |
| 387 | + [ @cmd, '-t', 's1.*', '--no-dependent-indexes', 'db2' ], |
388 | 388 | 2,
|
389 | 389 | [ $missing_file_re ],
|
390 | 390 | [ $no_output_re ],
|
|
394 | 394 | # corruption messages on stdout, and nothing on stderr.
|
395 | 395 | #
|
396 | 396 | $node->command_checks_all(
|
397 |
| - [ @cmd, 'db1', '-s', 's3' ], |
| 397 | + [ @cmd, '-s', 's3', 'db1' ], |
398 | 398 | 2,
|
399 | 399 | [ $index_missing_relation_fork_re,
|
400 | 400 | $line_pointer_corruption_re,
|
|
407 | 407 | # options the toast corruption is reported, but when excluding toast we get no
|
408 | 408 | # error reports.
|
409 | 409 | $node->command_checks_all(
|
410 |
| - [ @cmd, 'db1', '-s', 's4' ], |
| 410 | + [ @cmd, '-s', 's4', 'db1' ], |
411 | 411 | 2,
|
412 | 412 | [ $missing_file_re ],
|
413 | 413 | [ $no_output_re ],
|
414 | 414 | 'pg_amcheck in schema s4 reports toast corruption');
|
415 | 415 |
|
416 | 416 | $node->command_checks_all(
|
417 |
| - [ @cmd, '--no-dependent-toast', '--exclude-toast-pointers', 'db1', '-s', 's4' ], |
| 417 | + [ @cmd, '--no-dependent-toast', '--exclude-toast-pointers', '-s', 's4', 'db1' ], |
418 | 418 | 0,
|
419 | 419 | [ $no_output_re ],
|
420 | 420 | [ $no_output_re ],
|
421 | 421 | 'pg_amcheck in schema s4 excluding toast reports no corruption');
|
422 | 422 |
|
423 | 423 | # Check that no corruption is reported in schema db1.s5
|
424 | 424 | $node->command_checks_all(
|
425 |
| - [ @cmd, 'db1', '-s', 's5' ], |
| 425 | + [ @cmd, '-s', 's5', 'db1' ], |
426 | 426 | 0,
|
427 | 427 | [ $no_output_re ],
|
428 | 428 | [ $no_output_re ],
|
|
432 | 432 | # the indexes, no corruption is reported about the schema.
|
433 | 433 | #
|
434 | 434 | $node->command_checks_all(
|
435 |
| - [ @cmd, 'db1', '-s', 's1', '-I', 't1_btree', '-I', 't2_btree' ], |
| 435 | + [ @cmd, '-s', 's1', '-I', 't1_btree', '-I', 't2_btree', 'db1' ], |
436 | 436 | 0,
|
437 | 437 | [ $no_output_re ],
|
438 | 438 | [ $no_output_re ],
|
|
443 | 443 | # about the schema.
|
444 | 444 | #
|
445 | 445 | $node->command_checks_all(
|
446 |
| - [ @cmd, 'db1', '-t', 's1.*', '--no-dependent-indexes' ], |
| 446 | + [ @cmd, '-t', 's1.*', '--no-dependent-indexes', 'db1' ], |
447 | 447 | 0,
|
448 | 448 | [ $no_output_re ],
|
449 | 449 | [ $no_output_re ],
|
|
453 | 453 | # tables that no corruption is reported.
|
454 | 454 | #
|
455 | 455 | $node->command_checks_all(
|
456 |
| - [ @cmd, 'db1', '-s', 's2', '-T', 't1', '-T', 't2' ], |
| 456 | + [ @cmd, '-s', 's2', '-T', 't1', '-T', 't2', 'db1' ], |
457 | 457 | 0,
|
458 | 458 | [ $no_output_re ],
|
459 | 459 | [ $no_output_re ],
|
|
463 | 463 | # to avoid getting messages about corrupt tables or indexes.
|
464 | 464 | #
|
465 | 465 | command_fails_like(
|
466 |
| - [ @cmd, 'db1', '-s', 's5', '--startblock', 'junk' ], |
| 466 | + [ @cmd, '-s', 's5', '--startblock', 'junk', 'db1' ], |
467 | 467 | qr/invalid start block/,
|
468 | 468 | 'pg_amcheck rejects garbage startblock');
|
469 | 469 |
|
|
473 | 473 | 'pg_amcheck rejects garbage endblock');
|
474 | 474 |
|
475 | 475 | command_fails_like(
|
476 |
| - [ @cmd, 'db1', '-s', 's5', '--startblock', '5', '--endblock', '4' ], |
| 476 | + [ @cmd, '-s', 's5', '--startblock', '5', '--endblock', '4', 'db1' ], |
477 | 477 | qr/end block precedes start block/,
|
478 | 478 | 'pg_amcheck rejects invalid block range');
|
479 | 479 |
|
|
482 | 482 | # arguments are handled sensibly.
|
483 | 483 | #
|
484 | 484 | $node->command_checks_all(
|
485 |
| - [ @cmd, 'db1', '-s', 's1', '-i', 't1_btree', '--parent-check' ], |
| 485 | + [ @cmd, '-s', 's1', '-i', 't1_btree', '--parent-check', 'db1' ], |
486 | 486 | 2,
|
487 | 487 | [ $index_missing_relation_fork_re ],
|
488 | 488 | [ $no_output_re ],
|
489 | 489 | 'pg_amcheck smoke test --parent-check');
|
490 | 490 |
|
491 | 491 | $node->command_checks_all(
|
492 |
| - [ @cmd, 'db1', '-s', 's1', '-i', 't1_btree', '--heapallindexed', '--rootdescend' ], |
| 492 | + [ @cmd, '-s', 's1', '-i', 't1_btree', '--heapallindexed', '--rootdescend', 'db1' ], |
493 | 493 | 2,
|
494 | 494 | [ $index_missing_relation_fork_re ],
|
495 | 495 | [ $no_output_re ],
|
|
0 commit comments