Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aq1os-00057X-J6 for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Apr 2016 17:09:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1aq1or-0001y3-UB for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Apr 2016 17:09: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_2) (envelope-from ) id 1aq1nV-0000TH-W0 for pgsql-hackers@postgresql.org; Tue, 12 Apr 2016 17:08:18 +0000 Received: from smtp-auth.no-ip.com ([8.23.224.61] helo=out.smtp-auth.no-ip.com) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1aq1nR-0003jo-VX; Tue, 12 Apr 2016 17:08:16 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [200.83.202.40]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id D94DE400EB3; Tue, 12 Apr 2016 10:08:06 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id A6FD29F; Tue, 12 Apr 2016 14:08:04 -0300 (CLT) Date: Tue, 12 Apr 2016 14:08:04 -0300 From: Alvaro Herrera To: Kevin Grittner Cc: pgsql-hackers@postgresql.org Subject: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold < Message-ID: <20160412170804.GA914597@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -1.1 (-) 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 Kevin Grittner wrote: > Avoid extra locks in GetSnapshotData if old_snapshot_threshold < 0 > > On a big NUMA machine with 1000 connections in saturation load > there was a performance regression due to spinlock contention, for > acquiring values which were never used. Just fill with dummy > values if we're not going to use them. old_snapshot_threshold is PGC_POSTMASTER, so this is okay AFAICS, but perhaps it'd be a good idea to add a oneline comment to guc.c indicating to verify this code if there's an intention to lift that limitation -- snapshots taken before the reload would have invalid lsn/timestamp, so the current check would simply skip the check, which would be the wrong thing to do. I think it's reasonable to want to enable this feature with a simple reload, so if we ever do that it'd be good to have a pointer about that gotcha. (I'm not proposing you do that, only add the comment for a future hacker.) -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers