From: | Shane Ambler <pgsql(at)Sheeky(dot)Biz> |
---|---|
To: | William Garrison <postgres(at)mobydisk(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Postgres General List <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Restoring a database from a file system snapshot |
Date: | 2008-08-28 16:57:35 |
Message-ID: | 48B6D8FF.9060209@Sheeky.Biz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
William Garrison wrote:
> We have a SAN volume, and we created a tablespace that that points to
> that SAN volume (Z: drive). This put all the table files on Z:. It
> was our assumption that the table files + the archived transaction
> would now be on the Z: drive, and that was enough to restore the
> database.
One instance of postgresql running on a machine constitutes a cluster,
which may contain more than one database. All the data and logs for the
cluster are normally contained in the one folder. Some things like logs
can be configured to be stored outside of this folder. System wide data
is also stored in this folder, such as list of databases, users and
tablespace definitions.
You can configure the postgresql cluster to use a data folder located
anywhere you wish.
You can use tablespaces to store specific items (database, tables,
indexes) outside of the specified data directory - usually this is to
locate them on separate disks for performance reasons.
Only items created to use the tablespace are located within the folder
specified for that tablespace, everything else goes into the data directory.
So CREATE DATABASE mydb WITH TABLESPACE myzdrive; will create a database
and all of it's associated contents in your z drive folder - outside of
the cluster's data folder where the logs, transaction logs and system
wide data is located.
--
Shane Ambler
pgSQL (at) Sheeky (dot) Biz
Get Sheeky @ http://Sheeky.Biz
From | Date | Subject | |
---|---|---|---|
Next Message | Douglas McNaught | 2008-08-28 17:07:50 | Re: WAL file questions - how to relocate on Windows, how to replay after total loss, etc |
Previous Message | Bill Moran | 2008-08-28 16:47:59 | Re: Vaccuum best practice: cronjob or autovaccuum? |