Re: migrating/spliting Postgres data directory on OpenIndiana

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: migrating/spliting Postgres data directory on OpenIndiana
Дата
Msg-id 508A1E93.5010004@hogranch.com
обсуждение исходный текст
Ответ на migrating/spliting Postgres data directory on OpenIndiana  (Boris Epstein <borepstein@gmail.com>)
Список pgsql-general
On 10/25/12 11:46 AM, Boris Epstein wrote:
>
> At this point I tried to just move the directory and use a soft link
> to repoint to it - but so far I have not even been able to do that
> properly, using pg_ctl. Apparently the process would not die. What
> should I look into to debug this one?

try the -m fast   switch to pg_ctl stop ...  this tells it to cleanly
exit any pending queries and terminate the client connections.  without
this, the postmaster waits for all the client apps to exit on their own,
which might be a rather long time.

stop the database server, THEN move the data directory.  you can then
use a symlink, or just change your startup scripts to set $PGDATA to the
new location.   if you do it that way, I suggest also setting PGDATA in
the postgres user's unix profile so commands like pg_ctl know where to look.


> And if I want to split the storage - i.e., put databases into
> different directories - can I do that?

there's little point in using different directories (tablespaces) on the
same device, but there are many scenarios where putting different
tablespaces on separate devices can be useful.

note a tablespace can be the default for a whole database (or more than
one), or it can be used on a table by table basis, so you can spread
tables across multiple file systems and physical devices.

--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast



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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: migrating/spliting Postgres data directory on OpenIndiana
Следующее
От: José Pedro Santos
Дата:
Сообщение: pg_wrapper error