Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jXR8g-0002jo-EK for pgsql-bugs@arkaria.postgresql.org; Sat, 09 May 2020 15:11:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jXR88-0007Hx-88 for pgsql-bugs@arkaria.postgresql.org; Sat, 09 May 2020 15:11:08 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jXR88-0007HN-1k for pgsql-bugs@lists.postgresql.org; Sat, 09 May 2020 15:11:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jXR84-00050L-DJ for pgsql-bugs@lists.postgresql.org; Sat, 09 May 2020 15:11:07 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 049FAmde003305; Sat, 9 May 2020 11:10:49 -0400 From: Tom Lane To: bchen90@163.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16426: In active/hot standby mode, create database and drop template databases cause standby restart failed In-reply-to: <16426-8150eafd94d1ba37@postgresql.org> References: <16426-8150eafd94d1ba37@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Sat, 09 May 2020 12:44:53 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3303.1589037048.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Sat, 09 May 2020 11:10:48 -0400 Message-ID: <3304.1589037048@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form writes: > In active/hot standby mod, doing likes the following: > 1) using createdb to create a database 'test' > 2) drop template0 and template1 database Removing the template0 database is not a supported configuration. There are emergency situations where it could make sense to do it, perhaps, but only if you then recreate it (using some other database as template); and even then you'd better be a guru who knows exactly what he's doing, or you'll mess up the installation beyond repair. It's certainly no surprise that dump/restore type activities will fail with no template for CREATE DATABASE to source from. > Is this a Bug? No, it's Pilot Error. regards, tom lane