Re: a few questions (and doubts) about xid

Поиск
Список
Период
Сортировка
От Luca Ferrari
Тема Re: a few questions (and doubts) about xid
Дата
Msg-id 200707260842.45104.fluca1978@infinito.it
обсуждение исходный текст
Ответ на Re: a few questions (and doubts) about xid  (Gregory Stark <stark@enterprisedb.com>)
Ответы Re: a few questions (and doubts) about xid  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-general
On Wednesday 25 July 2007 Gregory Stark's cat, walking on the keyboard, wrote:
> If you really want to understand how snapshots work at this level you could
> read (slowly -- it's pretty dense stuff) through
> src/backend/utils/time/tqual.c:HeapTupleSatisfiesMVCC()

Ok, I need a little hint here:

        if (tuple->t_infomask & HEAP_XMAX_COMMITTED)
    {
        if (tuple->t_infomask & HEAP_IS_LOCKED)
            return true;
        return false;
    }

if the tuple xmin has committed and the xmax is also committed the tuple is
not visible (return false). But if it is locked then the tuple is visible.
Now htup.h says that if the tuple is locked it has not been really deleted by
xmax, but only locked. Does this means that xmax is going to release locks?
In other words the tuple will not be visible while it is locked, even if the
xmax has committed but still not released the locks? Is this a situation due
to a delay between the commit and the lock release?

Thanks,
Luca

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

Предыдущее
От: Luca Ferrari
Дата:
Сообщение: Re: granting acces to an external client
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: a few questions (and doubts) about xid