[general] rsync'd database requires reindex - why ?

Поиск
Список
Период
Сортировка
От marcin kowalski
Тема [general] rsync'd database requires reindex - why ?
Дата
Msg-id CABKsJ=Q=52X3EdasUd6tpfGLbZt-DYZqYJyzO1AVtOP-rmyp+Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: [general] rsync'd database requires reindex - why ?  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-general
Hi list.

I'm migrating a bunch of old suse 9.3 systems with postgresql 8.2 databases to opensuse 11.4 systems with 8.2 databases (the exact same version - 8.2.14). From there, the databases will be migrated to postgresql 9.x with custom process.

Let's assume that 9.3 machine is machine A, and new one is machine B.

For now, i'm simply stopping postgresql on both machines, and rsync-ing the entire data directory from A to B. And then starting postgresql on the new one.

I do it with rsync -azvr --delete parameters.

New machine has only bare minimum databases running prior to migration - template0, template1, postgres. Which means that any extra user database has its directory copied over from scratch. Postgresql starts up without any issues after transfer is finished.

However, when running the new instance, it seems indexes are quite botched, e.g.

"select * from table where primary_key_column='somevalue';" returns nothing.

when doing plain "select * from table;" i can see the row that should have been returned by the previous query.

Reindexing all databases seems to resolve the problem.

This is very reproductible, as i have lots of machines to migrate and i've hit this problem at least three times now. For now, i'm just reindexing databases after i've done rsyncing them, but is that behavior expected ?

Both machines have postgresql-8.2.14 built by hand, with the same configuration and with contrib installed.

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

Предыдущее
От: "Benjamin Arai, Ph.D."
Дата:
Сообщение: Using KNN for objects that have more than 2 dimensions?
Следующее
От: Ashesh Vashi
Дата:
Сообщение: Re: Installing postgresql on windows 7