Re: synchronized snapshots
Florian G. Pflug <fgp@phlo.org>
From: Florian Pflug <fgp@phlo.org>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: "Robert Haas" <robertmhaas@gmail.com>, "Tom Lane" <tgl@sss.pgh.pa.us>, "Marko Tiikkaja" <marko.tiikkaja@2ndquadrant.com>, "Joachim Wieland" <joe@mcknight.de>, "pgsql-hackers" <pgsql-hackers@postgresql.org>
Date: 2011-10-19T20:30:26Z
Lists: pgsql-hackers
On Oct19, 2011, at 19:49 , Kevin Grittner wrote: > Robert Haas <robertmhaas@gmail.com> wrote: >> Tom Lane <tgl@sss.pgh.pa.us> wrote: >>> Florian Pflug <fgp@phlo.org> writes: > >>>> This allows a deferrable snapshot to be used on a second >>>> connection (by e.g. pg_dump), and still be marked as DEFERRABLE. >>>> If we throw an error unconditionally, the second connection has >>>> to import the snapshot without marking it DEFERRABLE, which I >>>> think has consequences for performance. >>> >>> No, I don't believe that either. AIUI the performance benefit >>> comes if the snapshot is recognized as safe. DEFERRABLE only >>> means to keep retrying until you get a safe one. > > Right, there are other circumstances in which a READ ONLY > transaction's snapshot may be recognized as safe, and it can opt out > of all the additional SSI logic. As you say, DEFERRABLE means we > *wait* for that. Oh, cool. I thought the opt-out only works for explicitly DEFERRABLE transactions. best regards, Florian Pflug