Re: Commit visibility guarantees

Поиск
Список
Период
Сортировка
Искать
От
Alvaro Herrera
Тема
Re: Commit visibility guarantees
Дата
в 20:57:17
Msg-id
20090518235707.GR10339@alvh.no-ip.org
Ответ на
Список
Дерево обсуждения
Commit visibility guarantees Marsh Ray <marsh5143@gmail.com>
Re: Commit visibility guarantees Sam Mason <sam@samason.me.uk>
Re: Commit visibility guarantees Marsh Ray <marsh5143@gmail.com>
Re: Commit visibility guarantees Tom Lane <tgl@sss.pgh.pa.us>
Re: Commit visibility guarantees Marsh Ray <marsh5143@gmail.com>
Re: Commit visibility guarantees Simon Riggs <simon@2ndQuadrant.com>
Re: Commit visibility guarantees Alvaro Herrera <alvherre@commandprompt.com>
Re: Commit visibility guarantees "Albe Laurenz" <laurenz.albe@wien.gv.at>
Marsh Ray escribió:
> On Mon, May 18, 2009 at 6:20 PM, Tom Lane  wrote:
> > Marsh Ray  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.

On a serializable transaction all queries will use the same snapshot
taken when the first query is executed.  Otherwise (read committed), a
new query always gets a fresh one.

(Old snapshots are also used for stuff like cursors that remain open,
but that's not the case here.)

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
В списке pgsql-general по дате отправления
От: Alvaro Herrera
Дата:
Сообщение: Re: array/function question
От: Nagy Zoltan
Дата:
Сообщение: Re: array/function question
FAQ