computeflightsrange();
});
-$dbh_tests->do("SET LOCAL enable_seqscan=false");
-# Otherwise the PostgreSQL query planner likes to do a complete scan
-# of the runvars table, rather than walking backwards through the
-# flights until it has what we've told it is enough.
-
foreach my $host (@ARGV) {
if ($host =~ m/^flight:/) {
my $flight=$'; #';
db_retry($dbh_tests, [], sub {
+ $dbh_tests->do("SET LOCAL enable_seqscan=false");
+ # Otherwise the PostgreSQL query planner likes to do a
+ # complete scan of the runvars table, rather than walking
+ # backwards through the flights until it has what we've
+ # told it is enough.
+
our $hostsinflightq //= db_prepare(<<END);
SELECT DISTINCT val
FROM runvars