aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_rewind/t/002_databases.pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_rewind/t/002_databases.pl')
-rw-r--r--src/bin/pg_rewind/t/002_databases.pl12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/bin/pg_rewind/t/002_databases.pl b/src/bin/pg_rewind/t/002_databases.pl
index 6dc05720a1e..0562c21549b 100644
--- a/src/bin/pg_rewind/t/002_databases.pl
+++ b/src/bin/pg_rewind/t/002_databases.pl
@@ -15,19 +15,27 @@ sub run_test
RewindTest::setup_cluster($test_mode, ['-g']);
RewindTest::start_master();
- # Create a database in master.
+ # Create a database in master with a table.
master_psql('CREATE DATABASE inmaster');
+ master_psql('CREATE TABLE inmaster_tab (a int)', 'inmaster');
RewindTest::create_standby($test_mode);
- # Create another database, the creation is replicated to the standby
+ # Create another database with another table, the creation is
+ # replicated to the standby.
master_psql('CREATE DATABASE beforepromotion');
+ master_psql('CREATE TABLE beforepromotion_tab (a int)',
+ 'beforepromotion');
RewindTest::promote_standby();
# Create databases in the old master and the new promoted standby.
master_psql('CREATE DATABASE master_afterpromotion');
+ master_psql('CREATE TABLE master_promotion_tab (a int)',
+ 'master_afterpromotion');
standby_psql('CREATE DATABASE standby_afterpromotion');
+ standby_psql('CREATE TABLE standby_promotion_tab (a int)',
+ 'standby_afterpromotion');
# The clusters are now diverged.