aboutsummaryrefslogtreecommitdiff
path: root/contrib/bloom/t/001_wal.pl
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bloom/t/001_wal.pl')
-rw-r--r--contrib/bloom/t/001_wal.pl15
1 files changed, 10 insertions, 5 deletions
diff --git a/contrib/bloom/t/001_wal.pl b/contrib/bloom/t/001_wal.pl
index dbb6a905b60..56c6618d3d1 100644
--- a/contrib/bloom/t/001_wal.pl
+++ b/contrib/bloom/t/001_wal.pl
@@ -16,7 +16,7 @@ sub test_index_replay
# Wait for standby to catch up
my $applname = $node_standby->name;
my $caughtup_query =
- "SELECT pg_current_xlog_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
+"SELECT pg_current_xlog_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
$node_master->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby 1 to catch up";
@@ -56,20 +56,25 @@ $node_standby->start;
# Create some bloom index on master
$node_master->psql("postgres", "CREATE EXTENSION bloom;");
$node_master->psql("postgres", "CREATE TABLE tst (i int4, t text);");
-$node_master->psql("postgres", "INSERT INTO tst SELECT i%10, substr(md5(i::text), 1, 1) FROM generate_series(1,100000) i;");
-$node_master->psql("postgres", "CREATE INDEX bloomidx ON tst USING bloom (i, t) WITH (col1 = 3);");
+$node_master->psql("postgres",
+"INSERT INTO tst SELECT i%10, substr(md5(i::text), 1, 1) FROM generate_series(1,100000) i;"
+);
+$node_master->psql("postgres",
+ "CREATE INDEX bloomidx ON tst USING bloom (i, t) WITH (col1 = 3);");
# Test that queries give same result
test_index_replay('initial');
# Run 10 cycles of table modification. Run test queries after each modification.
-for my $i (1..10)
+for my $i (1 .. 10)
{
$node_master->psql("postgres", "DELETE FROM tst WHERE i = $i;");
test_index_replay("delete $i");
$node_master->psql("postgres", "VACUUM tst;");
test_index_replay("vacuum $i");
my ($start, $end) = (100001 + ($i - 1) * 10000, 100000 + $i * 10000);
- $node_master->psql("postgres", "INSERT INTO tst SELECT i%10, substr(md5(i::text), 1, 1) FROM generate_series($start,$end) i;");
+ $node_master->psql("postgres",
+"INSERT INTO tst SELECT i%10, substr(md5(i::text), 1, 1) FROM generate_series($start,$end) i;"
+ );
test_index_replay("insert $i");
}