Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZN4IZ-0002Nl-SH for pgsql-docs@arkaria.postgresql.org; Wed, 05 Aug 2015 19:24:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZN4IZ-0000Ye-Dt for pgsql-docs@arkaria.postgresql.org; Wed, 05 Aug 2015 19:24:23 +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 1ZN4IY-0000XU-8h for pgsql-docs@postgresql.org; Wed, 05 Aug 2015 19:24:22 +0000 Received: from mail-wi0-f176.google.com ([209.85.212.176]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZN4IU-0003ui-ER for pgsql-docs@postgresql.org; Wed, 05 Aug 2015 19:24:21 +0000 Received: by wibxm9 with SMTP id xm9so80868972wib.1 for ; Wed, 05 Aug 2015 12:24:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=pV/QawkTZjDQa09xe7ZQnbfbUobhtA/hnfM66IDc0mU=; b=Y21VvSd07fRRWWDLG4w37yQDnZ8yFiPEPMQ/gGXMOyUORgnmB3aYY83gfFRFpQ9KAg FjuYHUr7fmOM6CEKjNGcP9v1omEF6FVC9F/ZGIXeZTVuBeQ+hO6DMukA4ND9Fb0c1QMa kWWQULXoW+rji7KuCib5fAErNUrLInKjkt1DjjRZ4czAXV3nTKPNFPm/Qa1V5nIYZrsz tV9kehE8ZMgLhemyX5fLTQm6Pizp26ltTP3ffPBUuDCSQNYaDJk2ja7lpIm2VWcqGIIv 42yZwrLYtXGbNBEb1T+jpBo0iUMSQpZCXpXbuKTmd5AEigC5/YJ3xFNtV2FSLzBN7syQ q3Wg== X-Gm-Message-State: ALoCoQnA4L2impoMpJLWuH5Eo07uDGwCmx5SV/ENWZHO7CFqzrfKpQssasg726ZNkQ2vmu45cck3 X-Received: by 10.194.120.198 with SMTP id le6mr22858840wjb.133.1438802656530; Wed, 05 Aug 2015 12:24:16 -0700 (PDT) Received: from [10.1.0.101] (190.84.broadband17.iol.cz. [109.80.84.190]) by smtp.gmail.com with ESMTPSA id fz16sm9049394wic.3.2015.08.05.12.24.14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Aug 2015 12:24:15 -0700 (PDT) Message-ID: <55C262DD.6050402@2ndquadrant.com> Date: Wed, 05 Aug 2015 21:24:13 +0200 From: Petr Jelinek User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Alvaro Herrera , Robert Haas CC: Fujii Masao , pgsql-docs , Pg Hackers , Craig Ringer Subject: Re: max_worker_processes on the standby References: <20150715085751.GD2301@postgresql.org> <20150804044126.GO2441@postgresql.org> <20150804221300.GY2441@postgresql.org> In-Reply-To: <20150804221300.GY2441@postgresql.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 On 2015-08-05 00:13, Alvaro Herrera wrote: > Robert Haas wrote: >> On Tue, Aug 4, 2015 at 12:41 AM, Alvaro Herrera >> wrote: > >>> 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. > > So I discussed this with Petr. He points out that if we make the > standby follows the master, then the problem would be the misbehavior > that results once the standby is promoted: at that point the standby > would no longer "follow the master" and would start with the feature > turned off, which could be disastrous (depending on what are you using > the commit timestamps for). > > Given this, we're leaning towards the idea that the standby should not > try to follow the master at all. Instead, an extension that wants to > use this stuff can check the value for itself, and raise a fatal error > if it's not already turned on the config file. That way, a lot of the > strange corner cases disappear. > Actually, after thinking bit more about this I think the behavior of these two will be similar - you suddenly lose the commit timestamp info. The difference is that with fist option you'll lose it after restart while with second one you lose it immediately after promotion since there was never any info on the slave. Extensions can do sanity checking in both scenarios. The way I see it the first option has following advantages: - it's smaller change - it's more consistent with how wal_log_hints behaves - fixing the config does not require server restart since the in-memory state was set from WAL record automatically However the second option has also some: - one can have slave which doesn't have overhead of the commit timestamp SLRU if they don't need it there - it's theoretically easier to notice that the track_commit_timestamps is off in config because the the SQL interface will complain if called on the slave So +0.5 from me towards following master and removing the error message -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs