Re: CLUSTER patch
| От | Tom Lane |
|---|---|
| Тема | Re: CLUSTER patch |
| Дата | |
| Msg-id | 19224.1026665899@sss.pgh.pa.us обсуждение |
| Ответ на | CLUSTER patch (Alvaro Herrera <alvherre@atentus.com>) |
| Ответы |
Re: CLUSTER patch
|
| Список | pgsql-patches |
Alvaro Herrera <alvherre@atentus.com> writes:
> The way the cluster is done is still the same: first cluster the heap
> and swap relfilenodes, then drop old heap; then rebuild each index, swap
> relfilenodes with old index and drop new.
I do not see anything in this patch that touches relfilenode. Perhaps
the patch is incomplete?
> But as soon as I try to do anything to it (the new,
> clustered filenode) before transaction commit (building an index, say),
> the local buffer manager fails an assertion (actually,
> RelationNodeCacheGetRelation returns 0 for the given rnode), and the
> transaction aborts.
Hmm. If you do the swap in the correct way (viz, update the relation's
pg_class entry and then CommandCounterIncrement) I'd expect the relcache
to respond correctly. This does involve re-indexing the relcache entry
under a new relfilenode value, but that's not significantly different
from the case of renaming a relation.
regards, tom lane
В списке pgsql-patches по дате отправления: