Re: Moving Database Cluster to another drive

Поиск
Список
Период
Сортировка
От Daniel Begin
Тема Re: Moving Database Cluster to another drive
Дата
Msg-id COL129-DS1416B97A717C46F77B20994C40@phx.gbl
обсуждение исходный текст
Ответ на Re: Moving Database Cluster to another drive  (Luca Ferrari <fluca1978@infinito.it>)
Ответы Re: Moving Database Cluster to another drive  (Jan Lentfer <Jan.Lentfer@web.de>)
Список pgsql-novice
Thank Luca,

You wrote that "each index has a pointer to the block on disk that contains the tuple". If there is no mechanism that
insurethe tuples have the same location on the new drive (the block address), I should then expect a plane copy will
corruptsome/all the indexes, am I right (linked to the second question)? 

Best regards,
Daniel

-----Original Message-----
From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Luca Ferrari
Sent: May-18-15 02:27
To: Daniel Begin
Cc: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] Moving Database Cluster to another drive

On Sat, May 16, 2015 at 7:39 PM, Daniel Begin <jfd553@hotmail.com> wrote:
> - How indexes are actually implemented in PostgreSQL (how pgsql point
> to a record from an index)?
>

Not an easy answer. An index can have different implementation types, but for short each index has a pointer to the
blockon disk that contain the tuple. And indexes are, of course, on disk stuff. 

> - Could copying tables and indexes have had an effect on indexes?
>

Should not, but it could be.

> - How can I verify that some of the indexes were not corrupted?
>

Use explain, see pg_stat_user_indexes and do a reindex if you believe an index is corrupted.

I would expect this being more likely an issue with the hard drive (e.g., different seek times from the previous one).

Luca


--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice



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

Предыдущее
От: Luca Ferrari
Дата:
Сообщение: Re: Moving Database Cluster to another drive
Следующее
От: Jan Lentfer
Дата:
Сообщение: Re: Moving Database Cluster to another drive