Re: Migrating a Database to a new tablespace

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Migrating a Database to a new tablespace
Дата
Msg-id 22840.1145988798@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Migrating a Database to a new tablespace  (Markus Schaber <schabi@logix-tt.com>)
Ответы Re: Migrating a Database to a new tablespace  (Markus Schaber <schabi@logix-tt.com>)
Список pgsql-sql
Markus Schaber <schabi@logix-tt.com> writes:
> Tom Lane wrote:
>> Instead of assuming anything, why don't you look in the tablespace
>> directory and see what's there?  A quick "ls -aR" would give more
>> information than guessing.

> There's plenty of stuff there, 8.8 Gigabytes in total. The question is
> how to determine if any of those files are still needed, and how to
> migrate them so I can drop that tablespace.

Match the subdirectory names against pg_database.oid --- any subdir that
doesn't correspond to any live entry in pg_database is junk and can be
flushed.  Within a valid database's subdirectory, match the file names
to that database's pg_class.relfilenode (not oid!) to see if any of them
are live.
        regards, tom lane


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

Предыдущее
От: Markus Schaber
Дата:
Сообщение: Re: Migrating a Database to a new tablespace
Следующее
От: Markus Schaber
Дата:
Сообщение: Re: Migrating a Database to a new tablespace