Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zi1nl-0003fo-6W for pgsql-docs@arkaria.postgresql.org; Fri, 02 Oct 2015 14:59:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zi1nk-0006a1-NS for pgsql-docs@arkaria.postgresql.org; Fri, 02 Oct 2015 14:59:12 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Zi1nO-0005pn-W0; Fri, 02 Oct 2015 14:58:51 +0000 Received: from smtp-auth.no-ip.com ([8.23.224.61] helo=out.smtp-auth.no-ip.com) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Zi1nL-0007GQ-QA; Fri, 02 Oct 2015 14:58:49 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [200.104.52.149]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id A512A400E59; Fri, 2 Oct 2015 07:58:41 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id D29147DD; Fri, 2 Oct 2015 11:58:39 -0300 (CLT) Date: Fri, 2 Oct 2015 11:58:39 -0300 From: Alvaro Herrera To: Fujii Masao Cc: oonishitk@nttdata.co.jp, pgsql-docs , PostgreSQL-development Subject: Re: max_worker_processes on the standby Message-ID: <20151002145839.GZ2573@alvherre.pgsql> References: <20150930224806.GR2573@alvherre.pgsql> <20151001181240.GT2573@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="M38YqGLZlgb6RLPS" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --M38YqGLZlgb6RLPS Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Fujii Masao wrote: > What happens if pg_xact_commit_timestamp() is called in standby after > track_commit_timestamp is disabled in master, DeactivateCommitTs() is > called and all commit_ts files are removed in standby? I tried that case > and got the following assertion failure. Ah. So the standby needs to keep the module activated if it's enabled locally, even when it receives a message that the master turned it off. Here's a patch. Thanks for your continued testing! -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --M38YqGLZlgb6RLPS Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="committs.patch" Content-Transfer-Encoding: quoted-printable commit 7441f88b746b7522f1714ed9fec95c3c4fe1dacb=1B[m Author: Alvaro Herrera AuthorDate: Fri Oct 2 11:39:44 2015 -0300 CommitDate: Fri Oct 2 11:39:44 2015 -0300 Don't disable commit_ts in standby if enabled locally =20=20=20=20 Bug noticed by Fujii Masao diff --git a/src/backend/access/transam/commit_ts.c b/src/backend/access/tr= ansam/commit_ts.c index 79ca04a..24b8291 100644 --- a/src/backend/access/transam/commit_ts.c +++ b/src/backend/access/transam/commit_ts.c @@ -583,14 +583,15 @@ CommitTsParameterChange(bool newvalue, bool oldvalue) * pg_control. If the old value was already set, we already did this, so * don't do anything. * - * If the module is disabled in the master, disable it here too. + * If the module is disabled in the master, disable it here too, unless + * the module is enabled locally. */ if (newvalue) { if (!track_commit_timestamp && !oldvalue) ActivateCommitTs(); } - else if (oldvalue) + else if (!track_commit_timestamp && oldvalue) DeactivateCommitTs(false); } =20 --M38YqGLZlgb6RLPS Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs --M38YqGLZlgb6RLPS--