Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amyqO-0001BM-TE for pgsql-committers@arkaria.postgresql.org; Mon, 04 Apr 2016 07:22:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1amyqO-0006XU-Co for pgsql-committers@arkaria.postgresql.org; Mon, 04 Apr 2016 07:22:40 +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_2) (envelope-from ) id 1amyqB-0006Js-Md for pgsql-committers@postgresql.org; Mon, 04 Apr 2016 07:22:27 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amyq8-0005bQ-Nb for pgsql-committers@postgresql.org; Mon, 04 Apr 2016 07:22:26 +0000 Received: by mail.anarazel.de (Postfix, from userid 108) id E435F3B4BE3; Mon, 4 Apr 2016 09:22:23 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.2.5 Received: from andres.at.anarazel.de.authenticated.anarazel.de by mail.anarazel.de (Postfix) with ESMTPSA id E58463B4BE2 for ; Mon, 4 Apr 2016 09:22:20 +0200 (CEST) Received: by anarazel.de (Postfix, from userid 1000) id 31398101CF8; Mon, 4 Apr 2016 09:22:20 +0200 (CEST) Date: Mon, 4 Apr 2016 09:22:20 +0200 From: Andres Freund To: Simon Riggs Cc: pgsql-committers Subject: Re: pgsql: Avoid archiving XLOG_RUNNING_XACTS on idle server Message-ID: <20160404072220.GA2855@awork2.anarazel.de> References: <20160404062450.GB2431@awork2.anarazel.de> <20160404064202.GE2431@awork2.anarazel.de> <20160404064919.GG2431@awork2.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Pg-Spam-Score: -5.2 (-----) 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-04 08:08:32 +0100, Simon Riggs wrote: > For that matter, it's also important for hot standby; to deal with > > FATALed transactions which didn't write an abort record. It's kinda > > important to call StandbyReleaseOldLocks for those. And if a standby is > > in STANDBY_SNAPSHOT_READY it's also important to see this kind of > > record. > > > > Those objections apply to all solutions to the problem so far > proposed, No, because in the alternative proposal we determine that the system indeed has been idle since the last time a WAL record was logged. And only a few select records are exempt from being considered idle; every other type of record causes the system to be considered non-idle. > likely any solution. My understanding was that those issues are considered > the lesser of the two evils. I'm happy to revert this patch, as long as we > agree that it also blocks all further "bug fixes" so far proposed based > upon those arguments. Yes, please do. > > Additionally, we're now logging more WAL if archive timeout isn't > > configured, which doesn't strike me as a good idea. (to clarify, I'm comparing a configured XLogArchiveTimeout to none, not the before/after patch state) > That's not true either... + if (running->xcnt == 0 && + nlocks == 0 && + XLogArchiveTimeout > 0 && + !last_snapshot_overflowed) + { + LWLockRelease(XidGenLock); + return InvalidXLogRecPtr; + } How can XLogArchiveTimeout not imply a behavioural difference here? > Thanks for your comments, but you seem to be misreading the patch with > respect to the if clause and new brackets. I indeed missed the outer if; which addresses the logical issue. So the problem there isn't fixed at all. You ignored a good number of messages and just committed a patch with a different approach without any further discussion. So it shouldn't be particularly surprising that people aren't willing to look super careful at what you did. 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