Re: Commit visibility guarantees

From: Marsh Ray <marsh5143(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Commit visibility guarantees
Date: 2009-05-18 23:44:36
Message-ID: 2afbdd3f0905181644m655adb6as42e1391c412b2479@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, May 18, 2009 at 6:20 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Marsh Ray <marsh5143(at)gmail(dot)com> writes:
>> The central question: So if I successfully commit an update
>> transaction on one connection, then instantaneously issue a select on
>> another previously-opened connection, under what circumstances am I
>> guaranteed that the select will see the effects of the update?
>
> If the select is using a snapshot taken later than the commit, it will
> see the effects of the update.

Great! Just the kind of definitive answer I was looking for.

Now I just need to find a comprehensive list of all the things that
could cause an older snapshot to be retained, and ensure that none of
them could possibly be occurring on this connection.

This is a connection kept open for extended periods, and used
mutithreadedly for selects only. Do you suppose a long-running
concurrent select on another thread could be holding back the snapshot
for the whole connection? Hmm...

- Marsh

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2009-05-18 23:49:26 Re: array/function question
Previous Message Tom Lane 2009-05-18 23:20:15 Re: Commit visibility guarantees