Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apbts-0000JR-AH for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Apr 2016 13:29:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1apbtr-0001pn-Ri for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Apr 2016 13:29:07 +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 1apbsX-0000Mg-HZ for pgsql-hackers@postgresql.org; Mon, 11 Apr 2016 13:27:45 +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 1apbsT-0002kl-If; Mon, 11 Apr 2016 13:27:44 +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 [181.42.40.44]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id C9FBE4010A0; Mon, 11 Apr 2016 06:27:34 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 8804BA3; Mon, 11 Apr 2016 10:27:30 -0300 (CLT) Date: Mon, 11 Apr 2016 10:27:30 -0300 From: Alvaro Herrera To: Alexander Korotkov Cc: Kevin Grittner , Tom Lane , Andres Freund , Simon Riggs , Robert Haas , pgsql-hackers Subject: Re: [COMMITTERS] pgsql: Add the "snapshot too old" feature Message-ID: <20160411132730.GA836503@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 Alexander Korotkov wrote: > Kevin, > > This commit makes me very uneasy. I didn't much care about this patch > mainly because I didn't imagine its consequences. Now, I see following: > > 1) We uglify buffer manager interface a lot. This patch adds 3 more > arguments to BufferGetPage(). It looks weird. Should we try to find less > invasive way for doing this? Kevin's patch was much less invasive originally. It became invasive in the course of later review -- there was fear that future code would "forget" the snapshot check accidentally, which would have disastrous effects (data becomes invisible without notice). > 2) Did you ever try to examine performance regression? I tried simple read > only test on 4x18 Intel server. > pgbench -s 1000 -c 140 -j 100 -M prepared -S -T 300 -P 1 postgres (data > fits to shared_buffers) > > master - 193 740.3 TPS > snapshot too old reverted - 1 065 732.6 TPS > > So, for read-only benchmark this patch introduces more than 5 times > regression on big machine. Wow, this is terrible, but the patch is supposed to have no impact when the feature is not in use. Maybe there's some simple oversight that can be fixed. -- Á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