Lolly
Lolly

Reputation: 36422

postgreSQL with different data directories

Today I installed postgreSQL to work with. When I was reading documents about postgreSQL, I found there can be more than one data directory present. Is it more than one data directory for single installation ? Or I understood wrongly ?

In my installation, data directory is in

C:\Program Files\PostgreSQL\8.3\data

if it can be more than one data directory for single installation, how will be the directory structure ? Please help me in understanding.

Upvotes: 3

Views: 3993

Answers (2)

Craig Ringer
Craig Ringer

Reputation: 324465

There can be only one data directory for each PostgreSQL cluster. A cluster is a postmaster listening on a port, managing several databases from a single data directory. You can have multiple clusters by starting multiple postmasters with pg_ctl or via a system service, each listening on a different port and using a different data dir.

If you have multiple clusters on a machine you have multiple data directories. It's unusual to need to do this, but it is possible.

It would be immensely helpful if you'd link to the documents you're talking about when asking questions about them.

Upvotes: 4

Frank Heikens
Frank Heikens

Reputation: 127086

I think you mean a tablespace, please check the manual: CREATE TABLESPACE

Upvotes: 5

Related Questions