Re: Migrating a Database to a new tablespace

Поиск
Список
Период
Сортировка
От Markus Schaber
Тема Re: Migrating a Database to a new tablespace
Дата
Msg-id 44508A44.4090909@logix-tt.com
обсуждение исходный текст
Ответ на Re: Migrating a Database to a new tablespace  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Migrating a Database to a new tablespace  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
Hi, Bruce,

Bruce Momjian wrote:

> I have work someone did in the past.  I just need to be updated to deal
> with tablespaces.
> 
>     ftp://candle.pha.pa.us/pub/postgresql/mypatches/checkfile.*
> 
> Let me know if you want details.

It looks nice, but I would not like automatic deletion (or only optional
or configurable), there might be valid reasons for "alien" files to
exist. (README files for admins to communicate what this directory is
used for, MacOS ressource forks, Reiser4 special files etc...)

What about putting the identification code in a set returning function
or view that can be called by the admin. Then tools like nagios can call
it and ring the alarm bells when unknown files appear, or possibly
autovacuum calls it once on each session to generate log warnings.

Btw, are CLUSTER and ALTER TABLE ALTER COLUMN statements that "create or
drop a relation" in this sense? And what is with tables getting extended
to more than one file?


Another idea would be to first create and sync log entries about the
files to be created / deleted, and then actually create / delete the
files. So on log replay, the backend could watch out for file operations
from transactions that never completed. It will slow those operations
down, but such file operations are both seldom and relatively expensive
on most filesystems. And it does not help in case of fsync=off, but
those admins already take worse risks than wasting disk space.

Thanks,
Markus
-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org


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

Предыдущее
От: Markus Schaber
Дата:
Сообщение: Re: Migrating a Database to a new tablespace
Следующее
От: "Penchalaiah P."
Дата:
Сообщение: any one can help me how to get multiple rows in postgresql using arrays in functions