Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1annN8-0003Wf-QT for pgsql-committers@arkaria.postgresql.org; Wed, 06 Apr 2016 13:19:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1annN8-0006ht-7H for pgsql-committers@arkaria.postgresql.org; Wed, 06 Apr 2016 13:19:50 +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_2) (envelope-from ) id 1annMv-0006Gw-HO for pgsql-committers@postgresql.org; Wed, 06 Apr 2016 13:19:37 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1annMs-0001kl-Bu for pgsql-committers@postgresql.org; Wed, 06 Apr 2016 13:19:37 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 2207C20B99 for ; Wed, 6 Apr 2016 09:19:32 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Wed, 06 Apr 2016 09:19:32 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=8QSaKmGc3xXiivBVUGQSvC7Y7c0=; b=OdTkT g8kTIotDY37t4iNMhPXcVEOWNwqb5lNXdObqtvf+4kYMTmuocThvXTuZeaw0fap9 DUL36qjXXzyze1IZtPnsJlvSY0PYNr+m6AbB1UELR9DUCrq9u0VZjINLhURXhbkA SpOfCg7IfA8h1cP4r5n65HLtGHJGk5uQccaRYA= X-Sasl-enc: iU4EjTlboICYdJvWxOhOQPzwCGQkTUoPi4QZGQw4Q1LR 1459948771 Received: from intern.anarazel.de (tmo-096-17.customers.d1-online.com [80.187.96.17]) by mail.messagingengine.com (Postfix) with ESMTPA id BD72868018E; Wed, 6 Apr 2016 09:19:31 -0400 (EDT) Date: Wed, 6 Apr 2016 15:19:29 +0200 From: Andres Freund To: Simon Riggs Cc: Michael Paquier , PostgreSQL-development , pgsql-committers Subject: Re: [HACKERS] pgsql: Avoid archiving XLOG_RUNNING_XACTS on idle server Message-ID: <20160406131929.vqjprsdpj5njvzpz@alap3.anarazel.de> References: <20160404075048.GH2431@awork2.anarazel.de> <20160406084534.v4g7iey2iqlyy57r@alap3.anarazel.de> <20160406090905.lcspkmqjqamwgcup@alap3.anarazel.de> <20160406122739.wbjmom5rvhdeauvi@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org On 2016-04-06 13:50:24 +0100, Simon Riggs wrote: > On 6 April 2016 at 13:27, Andres Freund wrote: > > > On 2016-04-06 13:11:40 +0100, Simon Riggs wrote: > > > On 6 April 2016 at 10:09, Andres Freund wrote: > > > > On 2016-04-06 10:04:42 +0100, Simon Riggs wrote: > > > > The issue there is that we continue to issue checkpoints if the only > > > > activity since the last checkpoint was emitting a standby > > > > snapshot. That's because: > > > > > > > > > > I agree this is the current situation in 9.4 and 9.5, hence the bug > > report. > > > > > > This no longer occurs with the patches I have proposed. The snapshot is > > > skipped, so a further checkpoint never triggers. > > > > Not if there's a longrunning/idle transaction. > > > > Note that skipping the snapshot is actually a *problem* in some > > cases. As I've brought up upthread, to which you never replied. A > > xl_running_xacts->xcnt == 0/!overflowed snapshot can be very important > > for hot standby, because it allows ProcArrayApplyRecoveryInfo() to > > switch to INITIALIZED state: > > > > I replied by posting a patch to address your concern, how is that non-reply? It doesn't address the problem? It's irrelevant that the last snapshot had 0 xacts, if you start recovery from a later check/restartpoint; recovery won't process earlier running_xacts records. > > This obviously doesn't apply to WAL_LEVEL_LOGICAL as is (the if). And it > > also obviously repeats to log the same snapshot in a system where the > > state hasn't changed, but where running->xcnt != 0 or nlocks != 0. > My understanding from your previous comments was that it would be incorrect > to do that. I said: > For one it breaks cleanup with logical decoding which does *NEED* to > know that nothing is happening. Although only once, not repeatedly. The salient point is "Although only once, not repeatedly.". Which is pretty much same thing as for HS; to become consistent after a checkpoint. > Not true. I have listened to everything you've said and been patient with > the high number of mistakes in your replies. Simon, this is utterly ridiculous. Missing an if in a post-commit review, of a hastily committed patch, which hasn't previously been posted for review, is entirely normal. Greetings, Andres Freund -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers