pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kevin Grittner <kgrittn@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Ants Aasma <ants.aasma@eesti.ee>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Noah Misch <noah@leadboat.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Kevin Grittner <kgrittn@postgresql.org>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: pgsql-committers@postgresql.org <pgsql-committers@postgresql.org>
Subject: Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
Date: Tue, 24 May 2016 14:12:06 -0400
Message-ID: <6588.1464113526@sss.pgh.pa.us> (raw)
In-Reply-To: <CACjxUsNfxxZG2ZsxBbcVqX+3j=KXE11n2p_tm5OaQ0q_KO1z4w@mail.gmail.com>
References: <20160416205630.puxsglckxi3sn5ec@alap3.anarazel.de>
	<CAA4eK1JihZepuTasniqrHcsha0umwjeke_ay3AckpGMH4QdJ_g@mail.gmail.com>
	<171569342.34745.1461078735421@RIA>
	<CA+CSw_tqckBCfrTgMyQOBGscM=5t7qYzBS94udGUOFWiOLeHbw@mail.gmail.com>
	<CACjxUsNO=fwsug6yWUcbt=SW5ZjGBqA35ToWgN8LMoAMMMaS3A@mail.gmail.com>
	<20160506220728.bgyxet73t6s3hjiw@alap3.anarazel.de>
	<CACjxUsNmsE-c+NzDbeEX82najPs4CdhPm9MpDep1-VeEUXwegw@mail.gmail.com>
	<20160507004844.wbze4nhjqa67io2a@alap3.anarazel.de>
	<CACjxUsOwwoCsyrspbCviuYCW7zvBviHpTMLXTHY5zzD-F=CHMQ@mail.gmail.com>
	<CACjxUsNs5eomM0v_0PQ9kz3CbfGEBg4H_Bh-fT4nwcyw0jdJSQ@mail.gmail.com>
	<20160524170058.6fhenruilde4xza4@alap3.anarazel.de>
	<CACjxUsNfxxZG2ZsxBbcVqX+3j=KXE11n2p_tm5OaQ0q_KO1z4w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Kevin Grittner <kgrittn@gmail.com> writes:
> On Tue, May 24, 2016 at 12:00 PM, Andres Freund <andres@anarazel.de> 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



view thread (195+ messages)  latest in thread

Message-ID: <6588.1464113526@sss.pgh.pa.us>
Permalink:  ../6588.1464113526@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6588.1464113526@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, kgrittn@gmail.com, andres@anarazel.de, ants.aasma@eesti.ee, amit.kapila16@gmail.com, noah@leadboat.com, robertmhaas@gmail.com, kgrittn@postgresql.org, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
  In-Reply-To: <6588.1464113526@sss.pgh.pa.us>
  References: <20160416205630.puxsglckxi3sn5ec@alap3.anarazel.de> <CAA4eK1JihZepuTasniqrHcsha0umwjeke_ay3AckpGMH4QdJ_g@mail.gmail.com> <171569342.34745.1461078735421@RIA> <CA+CSw_tqckBCfrTgMyQOBGscM=5t7qYzBS94udGUOFWiOLeHbw@mail.gmail.com> <CACjxUsNO=fwsug6yWUcbt=SW5ZjGBqA35ToWgN8LMoAMMMaS3A@mail.gmail.com> <20160506220728.bgyxet73t6s3hjiw@alap3.anarazel.de> <CACjxUsNmsE-c+NzDbeEX82najPs4CdhPm9MpDep1-VeEUXwegw@mail.gmail.com> <20160507004844.wbze4nhjqa67io2a@alap3.anarazel.de> <CACjxUsOwwoCsyrspbCviuYCW7zvBviHpTMLXTHY5zzD-F=CHMQ@mail.gmail.com> <CACjxUsNs5eomM0v_0PQ9kz3CbfGEBg4H_Bh-fT4nwcyw0jdJSQ@mail.gmail.com> <20160524170058.6fhenruilde4xza4@alap3.anarazel.de> <CACjxUsNfxxZG2ZsxBbcVqX+3j=KXE11n2p_tm5OaQ0q_KO1z4w@mail.gmail.com> <6588.1464113526@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox