@@ -16,7 +16,7 @@ sub test_index_replay
1616# Wait for standby to catch up
1717my $applname =$node_standby -> name;
1818my $caughtup_query =
19- " SELECT pg_current_xlog_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname ';" ;
19+ " SELECT pg_current_xlog_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname ';" ;
2020$node_master -> poll_query_until(' postgres' ,$caughtup_query )
2121or die " Timed out while waiting for standby 1 to catch up" ;
2222
@@ -56,20 +56,25 @@ sub test_index_replay
5656# Create some bloom index on master
5757$node_master -> psql(" postgres" ," CREATE EXTENSION bloom;" );
5858$node_master -> psql(" postgres" ," CREATE TABLE tst (i int4, t text);" );
59- $node_master -> psql(" postgres" ," INSERT INTO tst SELECT i%10, substr(md5(i::text), 1, 1) FROM generate_series(1,100000) i;" );
60- $node_master -> psql(" postgres" ," CREATE INDEX bloomidx ON tst USING bloom (i, t) WITH (col1 = 3);" );
59+ $node_master -> psql(" postgres" ,
60+ " INSERT INTO tst SELECT i%10, substr(md5(i::text), 1, 1) FROM generate_series(1,100000) i;"
61+ );
62+ $node_master -> psql(" postgres" ,
63+ " CREATE INDEX bloomidx ON tst USING bloom (i, t) WITH (col1 = 3);" );
6164
6265# Test that queries give same result
6366test_index_replay(' initial' );
6467
6568# Run 10 cycles of table modification. Run test queries after each modification.
66- for my $i (1.. 10)
69+ for my $i (1 .. 10)
6770{
6871$node_master -> psql(" postgres" ," DELETE FROM tst WHERE i =$i ;" );
6972test_index_replay(" delete$i " );
7073$node_master -> psql(" postgres" ," VACUUM tst;" );
7174test_index_replay(" vacuum$i " );
7275my ($start ,$end ) = (100001 + ($i - 1) * 10000, 100000 +$i * 10000);
73- $node_master -> psql(" postgres" ," INSERT INTO tst SELECT i%10, substr(md5(i::text), 1, 1) FROM generate_series($start ,$end ) i;" );
76+ $node_master -> psql(" postgres" ,
77+ " INSERT INTO tst SELECT i%10, substr(md5(i::text), 1, 1) FROM generate_series($start ,$end ) i;"
78+ );
7479test_index_replay(" insert$i " );
7580}