Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZMjsI-0005py-3b for pgsql-docs@arkaria.postgresql.org; Tue, 04 Aug 2015 21:35:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZMjsH-0005lo-Lj for pgsql-docs@arkaria.postgresql.org; Tue, 04 Aug 2015 21:35:53 +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 1ZMjsF-0005hs-WA for pgsql-docs@postgresql.org; Tue, 04 Aug 2015 21:35:52 +0000 Received: from mail-lb0-x232.google.com ([2a00:1450:4010:c04::232]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZMjsD-0004NA-3J for pgsql-docs@postgresql.org; Tue, 04 Aug 2015 21:35:50 +0000 Received: by lbbyj8 with SMTP id yj8so13817050lbb.0 for ; Tue, 04 Aug 2015 14:35:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=TEliyA98YvVnNMx5l4gbm+6BAhXMpOaFLazo+0FxIwY=; b=Yp2uiC4mz1mlhFMJX8iYpqbXl9uvmM9BUETN+duLLD/VMsfvRJ5gPvkMyCma81u1pd uV73RknIegPBCy3SxPdasXamdsA+U5XwuQFj9CgJHp1gUXOS14uFXzdwOKLCeNcUauwn ZHQWnm+ybVQ1AOGewhF2WujVZw6ZnF/dcCbt72blIi6lmk4faHNH8rJ3rrMhbXVbm9XO m9wKok/gf3iZ6fPfCBeDqK3ZPV1eukTNwsjBzSGYG21IZkUtziWDL3bdwAxxIEa4GOVP BWH6++xvX665p8lRrLbDYFG0043Kc2/Eem8SqJXHO7srbKEtTnx9NLc+qLvh4VyX4bNF j5cA== MIME-Version: 1.0 X-Received: by 10.112.126.101 with SMTP id mx5mr6528731lbb.35.1438724147199; Tue, 04 Aug 2015 14:35:47 -0700 (PDT) Received: by 10.112.31.107 with HTTP; Tue, 4 Aug 2015 14:35:47 -0700 (PDT) In-Reply-To: <20150804044126.GO2441@postgresql.org> References: <20150715085751.GD2301@postgresql.org> <20150804044126.GO2441@postgresql.org> Date: Tue, 4 Aug 2015 17:35:47 -0400 Message-ID: Subject: Re: max_worker_processes on the standby From: Robert Haas To: Alvaro Herrera Cc: Fujii Masao , pgsql-docs Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -2.7 (--) 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 On Tue, Aug 4, 2015 at 12:41 AM, Alvaro Herrera wrote: > Robert Haas wrote: >> On Thu, Jul 16, 2015 at 12:07 AM, Fujii Masao wrote: >> > One example which makes me a bit confusing is; both master and >> > standby are running fine with track_commit_timestamp disabled, >> > then I enable it only on the master. That is, the value of >> > track_commit_timestamp is not the same between master and standby. >> > No error happens in this case. According to the code of xlog_redo(), >> > the commit timestamp tracking mechanism is activated in this case. > > Well. We could have the standby fail (i.e. stop replication) when it > receives the WAL record indicating that the master turned it on. But > that would be very unfriendly, so we chose to make it follow the > master config instead. We're okay with this part, yes? > >> > However, after that, if standby is restarted, standby emits an error >> > because the value of track_commit_timestamp is not the same between >> > master and standby. Simple question is; why do we need to cause >> > the standby fail in this case? Since I'm not familiar with the code of >> > track_commit_timestamp yet, I'm not sure whether this behavior is >> > valid or not. >> >> Hmm, that seems like awfully weird behavior. > > The alternative is to turn the feature on automatically if it sees that > the master also has it on, i.e. the value would not be what the config > file says it is. Doing this would be a bit surprising IMO, but given > the behavior above maybe it's better than the current behavior. I think it's totally reasonable for the standby to follow the master's behavior rather than the config file. That should be documented, but otherwise, no problem. If it were technologically possible for the standby to follow the config file rather than the master in all cases, that would be fine, too. But the current behavior is somewhere in the middle, and that doesn't seem like a good plan. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs