Re: synchronized snapshots

From: Florian Pflug <fgp(at)phlo(dot)org>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: "Robert Haas" <robertmhaas(at)gmail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Marko Tiikkaja" <marko(dot)tiikkaja(at)2ndquadrant(dot)com>, "Joachim Wieland" <joe(at)mcknight(dot)de>, "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: synchronized snapshots
Date: 2011-10-19 20:30:26
Message-ID: 6F6E036F-42E2-4863-BB61-AC14EC1F1A4D@phlo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Oct19, 2011, at 19:49 , Kevin Grittner wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Florian Pflug <fgp(at)phlo(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2011-10-19 20:33:00 pg_dumpall Sets Roll default_tablespace Before Creating Tablespaces
Previous Message Alvaro Herrera 2011-10-19 19:39:55 Re: Large C files