Обсуждение: cluster-operation successfull?

Поиск
Список
Период
Сортировка

cluster-operation successfull?

От
Timo Roessner
Дата:
Hi everybody,

the other day i used the cluster-command to cluster my data on a
previosly created index.
i did this on a postgreSQL-server (v.8) via SSH. the clustering took the
whole night....
when i came back to my computer the next morning the ssh-connection was
reset by the server, on which
the database is running.

My question now:

scince i didnt receive a success message from the cluster-operation i am
not quite sure wether the data was clustered at all
or wether the cluster-operation was canceled when the ssh-connection was
canceled.
is there a way to determine wether data was clustered or not? i have no
access to logfiles, so is there a way to find that out via psql?

thx in advance

Re: cluster-operation successfull?

От
Tom Lane
Дата:
Timo Roessner <timo.roessner@gmx.net> writes:
> scince i didnt receive a success message from the cluster-operation i am
> not quite sure wether the data was clustered at all
> or wether the cluster-operation was canceled when the ssh-connection was
> canceled.
> is there a way to determine wether data was clustered or not?

Look in the pg_index catalog to see which indexes are marked as
clustered.  In recent PG versions something like this is the easiest
way:

select indrelid::regclass, indexrelid::regclass from pg_index
where indisclustered;

I would expect the server to have finished out the command it was
currently working on before noticing the loss of connection, so
the odds are good that the cluster did finish.

            regards, tom lane

Re: cluster-operation successfull?

От
Timo Roessner
Дата:
thx for the help so far, but i am not quite sure if i understood the
answer, scince i am not that experienced in using
postgreSQL.

what means:

select indrelid::regclass, indexrelid::regclass from pg_index
where indisclustered;

?

what is the meaning of "indexrelid" and "regclass"?
i assume "indisclustered" means "indexisclustered", is this a
system-wide variable?

best regards...

Tom Lane wrote:

>Timo Roessner <timo.roessner@gmx.net> writes:
>
>
>>scince i didnt receive a success message from the cluster-operation i am
>>not quite sure wether the data was clustered at all
>>or wether the cluster-operation was canceled when the ssh-connection was
>>canceled.
>>is there a way to determine wether data was clustered or not?
>>
>>
>
>Look in the pg_index catalog to see which indexes are marked as
>clustered.  In recent PG versions something like this is the easiest
>way:
>
>select indrelid::regclass, indexrelid::regclass from pg_index
>where indisclustered;
>
>I would expect the server to have finished out the command it was
>currently working on before noticing the loss of connection, so
>the odds are good that the cluster did finish.
>
>            regards, tom lane
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?
>
>               http://www.postgresql.org/docs/faq
>
>
>
>