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 1kg8dq-0001OP-7g for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Nov 2020 15:48:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kg8dp-0002yS-69 for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Nov 2020 15:48:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kg8do-0002yL-QG for pgsql-hackers@lists.postgresql.org; Fri, 20 Nov 2020 15:48:04 +0000 Received: from forward500j.mail.yandex.net ([5.45.198.250]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kg8dm-000650-IS for pgsql-hackers@postgresql.org; Fri, 20 Nov 2020 15:48:04 +0000 Received: from mxback8g.mail.yandex.net (mxback8g.mail.yandex.net [IPv6:2a02:6b8:c03:7aa:0:640:693a:102e]) by forward500j.mail.yandex.net (Yandex) with ESMTP id 18D9C11C1984; Fri, 20 Nov 2020 18:48:00 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback8g.mail.yandex.net (mxback/Yandex) with ESMTP id GmttFlUuqm-lxJakOUw; Fri, 20 Nov 2020 18:47:59 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zsrv.org; s=mail; t=1605887279; bh=+wPvcQMvDEk2O8g4cb100Dp3kul9JaQ+8XXm8anBhCU=; h=References:Date:Message-Id:Cc:Subject:To:From; b=PHbpX1CJqWiTzuYIj5/xQso9Wn4lfvuerh6Rv7jw/upvayc7tRleqnG0HB1zbi/8S DtF0kHtGVGem8htdvsGq2vgxAnRw7kq66XGBq5VaaAr+xDJU2vnJ6kueFtwfkvmkCP Cq0gknSZi5caUOFf7mlH0YgArVdINPGESVu9J7dI= Authentication-Results: mxback8g.mail.yandex.net; dkim=pass header.i=@zsrv.org Received: by iva2-13089525268d.qloud-c.yandex.net with HTTP; Fri, 20 Nov 2020 18:47:59 +0300 From: Sergei Kornilov To: Peter Eisentraut , PostgreSQL-development Cc: Masahiko Sawada , Kyotaro Horiguchi , =?utf-8?B?w4FsdmFybyBIZXJyZXJh?= References: <20200310.175755.1250389993502025042.horikyota.ntt@gmail.com> <20200311.110637.1319131984113864409.horikyota.ntt@gmail.com> <2134a29f-e934-4585-e81f-ab416e1923be@2ndquadrant.com> <2808491585335240@iva3-67f911cb3a01.qloud-c.yandex.net> <5e93f9f5-9572-38d0-b740-f8a20dfcc165@2ndquadrant.com> <2985371605808012@mail.yandex.ru> Subject: Re: Improve handling of parameter differences in physical replication MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Fri, 20 Nov 2020 18:47:59 +0300 Message-Id: <12773171605884463@mail.yandex.ru> Content-Transfer-Encoding: 7bit Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello > I think I like "unpaused" better here, because "resumed" would seem to > imply that recovery can actually continue. Good, I agree. > One thing that has not been added to my patch is the equivalent of > 496ee647ecd2917369ffcf1eaa0b2cdca07c8730, which allows promotion while > recovery is paused. I'm not sure that would be necessary, and it > doesn't look easy to add either. Hmm... Good question. How about putting CheckForStandbyTrigger() in a wait loop, but reporting FATAL with an appropriate message, such as "promotion is not possible because of insufficient parameter settings"? Also it suits me if we only document that we ignore promote here. I don't think this is an important case. And yes, it's not easy to allow promotion, since we have already updated control file. Probably we need pause only after we reached consistency? 2020-11-20 18:10:23.617 MSK 19722 @ from [vxid: txid:0] [] LOG: entering standby mode 2020-11-20 18:10:23.632 MSK 19722 @ from [vxid: txid:0] [] WARNING: hot standby is not possible because of insufficient parameter settings 2020-11-20 18:10:23.632 MSK 19722 @ from [vxid: txid:0] [] DETAIL: max_connections = 100 is a lower setting than on the primary server, where its value was 150. 2020-11-20 18:10:23.632 MSK 19722 @ from [vxid: txid:0] [] LOG: recovery has paused 2020-11-20 18:10:23.632 MSK 19722 @ from [vxid: txid:0] [] DETAIL: If recovery is unpaused, the server will shut down. 2020-11-20 18:10:23.632 MSK 19722 @ from [vxid: txid:0] [] HINT: You can then restart the server after making the necessary configuration changes. 2020-11-20 18:13:09.767 MSK 19755 melkij@postgres from [local] [vxid: txid:0] [] FATAL: the database system is starting up regards, Sergei