Re: CLUSTER and MVCC

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas ADI SD
Тема Re: CLUSTER and MVCC
Дата
Msg-id E1539E0ED7043848906A8FF995BDA57901D43044@m0143.s-mxs.net
обсуждение исходный текст
Ответ на Re: CLUSTER and MVCC  ("Simon Riggs" <simon@2ndquadrant.com>)
Ответы Re: CLUSTER and MVCC  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
> > Is there a particular reason why CLUSTER isn't MVCC-safe? It seems
to
> > me that it would be trivial to fix, by using SnapshotAny instead of
> > SnapshotNow, and not overwriting the xmin/xmax with the xid of the
> > cluster command.
>
> It's trivial to fix now in this way, but it would break HOT,
> since an indexscan only returns one row per index entry.

Well, with SnapshotAny HOT should probably return all possibly visible
tuples
with an indexscan. (Btw, does CLUSTER really do an index scan ? Seems
for reading a whole table a seq scan and sort is usually cheaper, at
least when the clustering is so bad that a CLUSTER is needed.)

Andreas


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: CLUSTER and MVCC
Следующее
От: Csaba Nagy
Дата:
Сообщение: Re: CLUSTER and MVCC