Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a4cOU-0001hx-ET for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Dec 2015 22:30:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a4cOT-00039f-SG for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Dec 2015 22:30:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a4cOS-00038e-LP; Thu, 03 Dec 2015 22:30:28 +0000 Received: from out.smtp-auth.no-ip.com ([8.23.224.60]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1a4cOO-0003p5-0e; Thu, 03 Dec 2015 22:30:27 +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.53.52]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 27E43400B6D; Thu, 3 Dec 2015 14:30:16 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 4EFD11CDE; Thu, 3 Dec 2015 19:30:14 -0300 (CLT) Date: Thu, 3 Dec 2015 19:30:14 -0300 From: Alvaro Herrera To: Petr Jelinek Cc: Fujii Masao , Robert Haas , oonishitk@nttdata.co.jp, pgsql-docs , PostgreSQL-development Subject: Re: [DOCS] max_worker_processes on the standby Message-ID: <20151203223014.GU2763@alvherre.pgsql> References: <20151002185941.GE2573@alvherre.pgsql> <5622BF9D.2010409@2ndquadrant.com> <20151020190522.GT3391@alvherre.pgsql> <20151027180759.GG240637@alvherre.pgsql> <20151116214338.GD614468@alvherre.pgsql> <56606BA9.1050606@2ndquadrant.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <56606BA9.1050606@2ndquadrant.com> 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-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Petr Jelinek wrote: > While this seems good, I'd code it slightly differently. I didn't like the > addition of new bool when it's not really needed. This brings the question > if we actually need the BootStrapCommitTs and StartupCommitTs functions > which really don't do much though. Thanks, it's certainly nice that this got simpler. (I'm not in love with the idea of having xlog.c know what flag needs to pass in each case, but I don't see any option that's more convenient.) We weren't quite there however -- namely this patch didn't close problem #8 in Fujii-san rundown. The problem is that when promoting, standbyState is not STANDBY_DISABLED but STANDBY_SNAPSHOT_READY (which is a bit surprising but not something this patch should fix). To fix this I took the StartupCommitTs() call out of that block, so that it runs inconditionally. I also changed the hint message: postgres=# select * from pg_last_committed_xact(); ERROR: could not get commit timestamp data HINT: Make sure the configuration parameter "track_commit_timestamp" is set in the master server. Otherwise this would be very confusing: postgres=# select * from pg_last_committed_xact(); ERROR: could not get commit timestamp data HINT: Make sure the configuration parameter "track_commit_timestamp" is set. postgres=# show track_commit_timestamp ; track_commit_timestamp ------------------------ on (1 fila) -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers