Re: xid wraparound

Поиск
Список
Период
Сортировка
От Mark Rostron
Тема Re: xid wraparound
Дата
Msg-id FD020D3E50E7FA479567872E5F5F31E3045A05CBA1@ex01.corp.ql2.com
обсуждение исходный текст
Ответ на Re: xid wraparound  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: xid wraparound
Список pgsql-admin

>
>> When the XID wraps, at the moment it does so, unless you set
>> vacuum_freeze_min_age to 0 and a vacuum has just been performed, is
>> there not a chance that there will be some data loss?
>
>No.  XID comparisons are modulo 2^31.
>

Thanks - I'm still trying to wrap my mind around this (sorry).

So, for the sake of this description:
- the XID space (size 2^32) is split into two sub-spaces, each of size 2^31
- each XID is quantified in terms of "space" (0,1) plus "offset" (modulo 2^31) : x(s,o)
- each db row is stamped with an "age" XID : r(s,o)
- each db query start is an XID : q(s,o)

Therefore, a query can only see rows where:
(q.o > r.o) && (q.s == r.s) || (q.o <= r.o) && (q.s != r.s)

Something like that?


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

Предыдущее
От: Stan Hoeppner
Дата:
Сообщение: Re: [NOVICE] - SAN/NAS/DAS - Need advises
Следующее
От: Tom Lane
Дата:
Сообщение: Re: xid wraparound