4 use Test::More tests => 2;
10 RewindTest::init_rewind_test('databases', $testmode);
11 RewindTest::setup_cluster();
13 # Create a database in master.
14 master_psql('CREATE DATABASE inmaster');
16 RewindTest::create_standby();
18 # Create another database, the creation is replicated to the standby
19 master_psql('CREATE DATABASE beforepromotion');
21 RewindTest::promote_standby();
23 # Create databases in the old master and the new promoted standby.
24 master_psql('CREATE DATABASE master_afterpromotion');
25 standby_psql('CREATE DATABASE standby_afterpromotion');
26 # The clusters are now diverged.
28 RewindTest::run_pg_rewind();
30 # Check that the correct databases are present after pg_rewind.
31 check_query('SELECT datname FROM pg_database',
37 standby_afterpromotion