Re: A thought on Index Organized Tables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: A thought on Index Organized Tables
Дата
Msg-id 5335.1267219834@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: A thought on Index Organized Tables  (Gokulakannan Somasundaram <gokul007@gmail.com>)
Ответы Re: A thought on Index Organized Tables  (Gokulakannan Somasundaram <gokul007@gmail.com>)
Список pgsql-hackers
Gokulakannan Somasundaram <gokul007@gmail.com> writes:
>> It does.  The point is that the system is set up to limit the bad
>> consequences.  You might (will) get wrong query answers, but the
>> heap data won't get corrupted.
>> 
> Again Tom, if there is an update based on index scan, then it takes the
> tupleid and updates the wrong heap data right?

No, what generally happens is it fails to find a matching index entry at
all, because the search algorithm concludes there can be no match based
on the limited set of comparisons it's done.  Transitivity failures lead
to searching the wrong subset of the index.

The case you're thinking about could arise if VACUUM failed to clean out
an index entry; after some unrelated tuple is inserted at the
just-cleared TID, searches finding that index entry would mistakenly
process the new tuple.  This is why we insist on VACUUM not assuming
very much about the consistency of the index.

It's also a problem for thick indexes, because if you try to do a normal
index search for the index tuple to update its copy of the tuple
xmin/xmax data, you might fail to find it --- but that doesn't mean it's
not there.
        regards, tom lane


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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Hot Standby query cancellation and Streaming Replication integration
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Hot Standby query cancellation and Streaming Replication integration