1) using createdb to create a database 'test' 2) drop template0 and template1 database 3) using 'pt_ctl stop -mi' to stop the standby db 4) restart the standby db, start failed
How are you removing template databases? I got an error while dropping a template database.
postgres=# drop database template1; 2020-05-09 11:07:56.094 -03 [6304] ERROR: cannot drop a template database 2020-05-09 11:07:56.094 -03 [6304] STATEMENT: drop database template1; ERROR: cannot drop a template database postgres=# drop database template0; 2020-05-09 11:07:59.127 -03 [6304] ERROR: cannot drop a template database 2020-05-09 11:07:59.127 -03 [6304] STATEMENT: drop database template0; ERROR: cannot drop a template database
From:
PG Bug reporting form Date: Subject:
BUG #16426: In active/hot standby mode, create database and drop template databases cause standby restart failed