Re: [GENERAL] Physical Database Configuration - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [GENERAL] Physical Database Configuration
Date
Msg-id 200307190254.h6J2sFN17135@candle.pha.pa.us
Whole thread Raw
In response to Re: [GENERAL] Physical Database Configuration  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [GENERAL] Physical Database Configuration  (Rod Taylor <rbt@rbt.ca>)
Re: [GENERAL] Physical Database Configuration  (Gavin Sherry <swm@linuxworld.com.au>)
List pgsql-hackers
Tom Lane wrote:
> nolan@celery.tssi.com writes:
> > I disagree.  Just as you can have multiple schemas within one database
> > you can have multiple tablespaces within one database.  
> 
> > And the tablespace is irrelevant as far as specifying an object is concerned.
> > A fully qualified object would be: 
> >     database.schema.object,
> > not tablespace.database.schema.object or database.tablespace.schema.object.
> 
> Right, the tablespace structure is really orthogonal to the
> database/schema structure.
> 
> I would envision tablespaces as being named by database-cluster-wide
> names, just as users and groups are.  Any given table could be placed
> in any tablespace (although perhaps we want to invent some permission
> mechanism here).
> 
> Physically a tablespace is a directory with sub-directories for
> databases under it --- so $PGDATA/base plays the role of the default
> tablespace for a cluster.  (The reason you need per-database
> sub-directories is mostly to support DROP DATABASE, which has to be
> able to nuke a database without knowing exactly what's in it.)  But
> this structure doesn't have anything to do with the logical structure
> of the database cluster.

Another good reason for per-database directories under the tablespace is
to prevent directories from containing too many files.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: commiters log
Next
From: Oleg Bartunov
Date:
Subject: Re: commiters log