File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -9423,8 +9423,17 @@ sub check_wal_files {
9423
9423
9424
9424
# # Figure out where the pg_xlog directory is
9425
9425
$SQL = qq{ SELECT count(*) AS count FROM $lsfunc ($lsargs ) WHERE $lsfunc ~ E'^[0-9A-F]{24}$extrabit \$ '} ; # # no critic (RequireInterpolationOfMetachars)
9426
- my $SQL10 = $opt {lsfunc } ? $SQL :
9427
- qq{ SELECT count(*) AS count FROM pg_ls_waldir() WHERE name ~ E'^[0-9A-F]{24}$extrabit \$ '} ; # # no critic (RequireInterpolationOfMetachars)
9426
+ my $SQL10 = " " ;
9427
+
9428
+ if ($extrabit ) {
9429
+ # check_archive_ready
9430
+ $SQL10 = $opt {lsfunc } ? $SQL :
9431
+ qq{ SELECT count(*) AS count FROM pg_ls_archive_statusdir() WHERE name ~ E'^[0-9A-F]{24}$extrabit \$ '} ; # # no critic (RequireInterpolationOfMetachars)
9432
+ } else {
9433
+ # check_wal_files
9434
+ $SQL10 = $opt {lsfunc } ? $SQL :
9435
+ qq{ SELECT count(*) AS count FROM pg_ls_waldir() WHERE name ~ E'^[0-9A-F]{24}\$ '} ; # # no critic (RequireInterpolationOfMetachars)
9436
+ }
9428
9437
9429
9438
my $info = run_command($SQL , {regex => qr [\d ] , version => [" >9.6 $SQL10 " ] });
9430
9439
You can’t perform that action at this time.
0 commit comments