Re: Repeatable read and serializable transactions see data committed after tx start

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Repeatable read and serializable transactions see data committed after tx start
Дата
Msg-id 27900.1415285763@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Repeatable read and serializable transactions see data committed after tx start  (Kevin Grittner <kgrittn@ymail.com>)
Ответы Re: Repeatable read and serializable transactions see data committed after tx start  ("Greg Sabino Mullane" <greg@turnstep.com>)
Список pgsql-hackers
Kevin Grittner <kgrittn@ymail.com> writes:
> Why?  This "fix" might not deal with the bigger issues that I
> discussed, like that the later-to-start and
> later-to-acquire-a-snapshot transaction might logically be first in
> the apparent order of execution.  You can't "fix" that without a
> lot of blocking -- that most of us don't want.  Depending on *why*
> they think this is important, they might need to be acquiring
> various locks to prevent behavior they don't want, in which case
> having acquired a snapshot at BEGIN would be exactly the *wrong*
> thing to do.  The exact nature of the problem we're trying to solve
> here does matter.

Another thing that I think hasn't been mentioned in this thread is
that we used to have severe problems with client libraries that like
to issue BEGIN and then go idle until they have something to do.
Which, for some reason, is a prevalent behavior.  That used to result
in problems like VACUUM not being able to clean up dead rows promptly.
We fixed that some time ago by making sure we didn't acquire an XID until
the first actual statement after BEGIN.  Snapshots as such were never a
problem for this, because we've never acquired a snapshot immediately at
BEGIN ... but if we did so, this problem would come right back.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: REINDEX CONCURRENTLY 2.0
Следующее
От: Bernd Helmle
Дата:
Сообщение: Re: Amazon Redshift