Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtlBy-0000kx-CV for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Nov 2015 23:40:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZtlBx-0000Pv-SQ for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Nov 2015 23:40:41 +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 1ZtlAe-00078n-0M for pgsql-hackers@postgresql.org; Tue, 03 Nov 2015 23:39:20 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZtlAb-0000yF-7t for pgsql-hackers@postgresql.org; Tue, 03 Nov 2015 23:39:18 +0000 Received: from [10.47.165.242] (tmo-102-46.customers.d1-online.com [80.187.102.46]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id 0549D860001; Wed, 4 Nov 2015 00:39:14 +0100 (CET) User-Agent: K-9 Mail for Android In-Reply-To: References: <20151016203031.3019.72930@wrigleys.postgresql.org> <20151102055841.2561.61366.pgcf@coridan.postgresql.org> <20151103154300.GY11897@awork2.anarazel.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby From: Andres Freund Date: Wed, 04 Nov 2015 00:39:18 +0100 To: Michael Paquier CC: Robert Haas , Jeff Janes , "pgsql-hackers@postgresql.org" Message-ID: <741137DB-35AF-450B-9746-7FE55A8729C3@anarazel.de> X-Pg-Spam-Score: -4.2 (----) 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 On November 4, 2015 12:37:02 AM GMT+01:00, Michael Paquier wrote: >On Wed, Nov 4, 2015 at 12:43 AM, Andres Freund >wrote: >> On 2015-11-03 10:23:35 -0500, Robert Haas wrote: >>> On Mon, Nov 2, 2015 at 12:58 AM, Jeff Janes >wrote: >>> > If a transaction holding locks aborts on an otherwise idle server, >perhaps it will take a very long time for a log-shipping standby to >realize this. But I have hard time believing that anyone who cares >about that would be using log-shipping (rather than streaming) anyway. >>> >>> I'm sure other people here understand this better than me, but I >>> wonder if it wouldn't make more sense to somehow log this data only >if >>> something material has changed in the data being logged. >> >> Phew. That doesn't seem easy to measure. I'm doubtful that it's worth >> comparing the snapshot and such, especially in the back >> branches. > >Well, I guess that's why I thought it would be more simple to check if >we are at the beginning of a segment at first sight. This has no >chance to break if anything else like that is being added in the >future as it doesn't depend on the record types, though new similar >records added on a timely manner would need a similar check. Perhaps >this could be coupled by a check on the last XLOG_SWITCH_XLOG record >instead of checkpoint activity though. > >> We could maybe add something that we only log a snapshot if XXX >> megabytes have been logged or something. But I don't know which >number >> to pick here - and if there's other write activity the price of a >> snapshot record really isn't high. > >On a completely idle system, I don't think we should log any standby >records. This is what ~9.3 does. Are you sure? I think it'll around checkpoints, no? I thought Heikki had fixed that, but looking sound that doesn't seem to be the case. Andres --- Please excuse brevity and formatting - I am writing this on my mobile phone. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers