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 1nteP6-0004cH-AK for pgsql-docs@arkaria.postgresql.org; Tue, 24 May 2022 23:57:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nteP5-0002uq-5q for pgsql-docs@arkaria.postgresql.org; Tue, 24 May 2022 23:57:31 +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 1nteP4-0002uh-Us for pgsql-docs@lists.postgresql.org; Tue, 24 May 2022 23:57:30 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nteP2-0001cX-NO for pgsql-docs@lists.postgresql.org; Tue, 24 May 2022 23:57:29 +0000 Received: from bruce by momjian.us with local (Exim 4.94.2) (envelope-from ) id 1nteP0-008Gqf-Kj; Tue, 24 May 2022 19:57:26 -0400 Date: Tue, 24 May 2022 19:57:26 -0400 From: Bruce Momjian To: yanliang lei Cc: "pgsql-docs@lists.postgresql.org" Subject: Re: about pg14 new parameter in_hot_standby Message-ID: References: <4d053c3c.91d.180e9eb5298.Coremail.msdnchina@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4d053c3c.91d.180e9eb5298.Coremail.msdnchina@163.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, May 22, 2022 at 11:59:15AM +0800, yanliang lei wrote: > in the pg14 document(https://www.postgresql.org/docs/14/ > runtime-config-preset.html) > > in_hot_standby parameter: > > Reports whether the server is currently in hot standby mode. > > When this is on, all transactions are forced to be read-only. > > Within a session, this can change only if the server is promoted to be primary. > See Section 27.4 for more information. > > > "Within a session, this can change only if the server is promoted to be > primary"--- I can not understand this statement. It means when the server is in read/write mode, called "primary" mode vs "standby" mode. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Indecision is a decision. Inaction is an action. Mark Batterson