Re: is cachedFetchXid ever invalidated?

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: is cachedFetchXid ever invalidated?
Дата
Msg-id 1291270531.18031.184.camel@jdavis
обсуждение исходный текст
Ответ на Re: is cachedFetchXid ever invalidated?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, 2010-12-01 at 23:34 -0500, Tom Lane wrote:
> Jeff Davis <pgsql@j-davis.com> writes:
> > I can't see any place that "cachedFetchXid" is ever invalidated.
> > Shouldn't it be invalidated before transaction ID wraparound?
> 
> The assumption is that the value won't sit there (in a particular
> session), without ever being replaced, while more than 2G transactions
> elapse.  Actually you'd need a full 4G transactions to elapse, and then
> to wake up just in time to probe the doppelganger of the very same
> transaction number, in order to have any risk of a failure.

Yeah, it's pretty far-fetched.

> One comparable failure case is that starting a transaction
> that acquires an XID, and then going to sleep for ~2G transactions,
> will cause all kinds of trouble.

I think it's well-known that holding a transaction open indefinitely
causes problems. I had assumed that a session was different (for
instance, a connection pool might keep connections around for a long
time). I'll re-align that assumption with reality.

Regards,Jeff Davis



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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Spread checkpoint sync
Следующее
От: Csaba Nagy
Дата:
Сообщение: Re: Another proposal for table synonyms