Re: broke postgres, how to fix??

Поиск
Список
Период
Сортировка
От JD Wong
Тема Re: broke postgres, how to fix??
Дата
Msg-id CAGuHHn8OUAYjMpOC6XkSOgVf8gicTbijgdmSrm+ZNJ8puyNmqQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: broke postgres, how to fix??  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Список pgsql-general
Thank you everybody for your help,

This problem has been resolved, in part to your insights.

All the best,
-JD

On Fri, Mar 1, 2013 at 4:31 AM, Albe Laurenz <laurenz.albe@wien.gv.at> wrote:
JD Wong wrote:
>>> Hi Adrian, yes I completely copied the config-file and data directories
>>> over.

>>      That's guaranteed to break everything badly.

> Even if I "read only style" copied the files? Do you mind elaborating on why this happens?  ( or point
> me to relevant documentation )

The problem is that if you copy the files of a running database,
these files will change while they are being copied.
This can result in unusable contents.
Also, to function properly, the different files
in a PostgreSQL data directory must be consistent with each other.
If you copy one file after the other, files that are copied later
might belong to a different state of the database than earlier files.

You either have to shutdown the database before copying
(a filesystem level offline backup) or use some instantaneous
snapshotting technique that your file system might offer.
In the latter case PostgreSQL should perform crash recovery
and eventually reach a consistent state.

Yours,
Laurenz Albe

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

Предыдущее
От: James Cloos
Дата:
Сообщение: Re: Floating point error
Следующее
От: Gregg Jaskiewicz
Дата:
Сообщение: Scalable cluster