Re: Schema, database, or tables in different folders?

From: Eric Schwarzenbach <subscriber(at)blackbrook(dot)org>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Schema, database, or tables in different folders?
Date: 2009-06-05 18:05:36
Message-ID: 4A295E70.7050503@blackbrook.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alan Hodgson wrote:
> On Tuesday 02 June 2009, "Carlos Oliva" <CarlosO(at)pbsinet(dot)com> wrote:
>
>> Is there a way to create a database or a table of a database in its own
>> folder? We are looking for ways to backup the sytem files of the
>> database to tape and one to exclude some tables from this backup. We
>> can selectively backup folders of the file system so we figure that if
>> we can create a schema or database or table in its own folder, we can
>> backup our database and exclude the tables selectively. We are using
>> Linux RedHat. Thank you.
>>
>
> You can put them in their own tablespace, but backing them up would not be
> useful. Filesystem backups of the cluster must include the whole database
> to be useful (and see the documentation on PITR for how to do it right).
>
> You can easily back up single databases with pg_dump, though.
>
>
And pg_dump has a parameter to dump only a particular schema.
I'd also suggest that a schema is a unit of logical partitioning whereas
a tablespace is unit of physical partitioning and the need to back up
only certain tables suggests a difference /requirement at the logical
level to me, so I suspect schema is the more appropriate design choice
anyway.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ivan Sergio Borgonovo 2009-06-05 20:38:44 Re: why dropping a trigger may cause a deadlock
Previous Message Jean Hoderd 2009-06-05 17:58:09 Re: NOT NULL with CREATE TYPE