grayhemp / pgtoolkit

Tools for PostgreSQL maintenance
Other
184 stars 16 forks source link

сluster index & Update by field #9

Open makm opened 9 years ago

makm commented 9 years ago

После reindex concurrency исчезает атрибут 'CLUSTER ON' индекса, которым приходится пользоваться в силу того, что pgcompacor зачем-то выбирает произвольное поле для Update By.

Как правильно использовать утилиту ?

grayhemp commented 9 years ago

Thank you for the feedback. Indeed, CLUSTER ON is a missed functionality in pgcompact. I'm adding the issue to my TODO list for the next minor version.

The "update by" column is not just a random column, it is chosen so that the updates would do the least possible impact on other objects. Here is the logic https://github.com/grayhemp/pgtoolkit/blob/master/lib/PgToolkit/Compactor/Table.pm#L1743-L1776.