Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b5Goa-0003ji-KA for pgsql-hackers@arkaria.postgresql.org; Tue, 24 May 2016 18:12:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b5Goa-0004Cr-6x for pgsql-hackers@arkaria.postgresql.org; Tue, 24 May 2016 18:12:24 +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 1b5GoX-00041H-AW; Tue, 24 May 2016 18:12:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b5GoT-0000Hq-Qj; Tue, 24 May 2016 18:12:20 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u4OIC6XK006589; Tue, 24 May 2016 14:12:06 -0400 From: Tom Lane To: Kevin Grittner cc: Andres Freund , Ants Aasma , Amit Kapila , Noah Misch , Robert Haas , Kevin Grittner , "pgsql-hackers@postgresql.org" , "pgsql-committers@postgresql.org" Subject: Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold < In-reply-to: References: <20160416205630.puxsglckxi3sn5ec@alap3.anarazel.de> <171569342.34745.1461078735421@RIA> <20160506220728.bgyxet73t6s3hjiw@alap3.anarazel.de> <20160507004844.wbze4nhjqa67io2a@alap3.anarazel.de> <20160524170058.6fhenruilde4xza4@alap3.anarazel.de> Comments: In-reply-to Kevin Grittner message dated "Tue, 24 May 2016 13:04:09 -0500" Date: Tue, 24 May 2016 14:12:06 -0400 Message-ID: <6588.1464113526@sss.pgh.pa.us> X-Pg-Spam-Score: -3.3 (---) 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 writes: > On Tue, May 24, 2016 at 12:00 PM, Andres Freund wrote: >> Analyze IIRC acquires a new snapshot when getting sample rows, > I could not find anything like that, and a case-insensitive search > of analyze.c finds no occurrences of "snap". Can you remember > where you think you saw something that would cause the ANALYZE > command in my test to use a snapshot other than the one from the > REPEATABLE READ transaction in which it was run? The control logic concerned with that is in vacuum.c, not analyze.c. AFAICS a manual ANALYZE that's within a transaction block would use the prevailing snapshot (see in_outer_xact tests). There are a lot of cases that wouldn't, though. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers