Thread: Multiple databases
Hi, A quick configuration question for everybody... When we create more than one database with psql, it appears as if everything is thrown into the same directory. I can understand having all the tables and indexes for a given database in the same directory, but multiple databases? Do we need to configure something differently, or is this just how postgres works? Thanks, -Noah
> Do we need to configure something differently, or is this just how > postgres works? Thats just how it works. Under 'base' there are a number of numbered directories which represent various databases. If you really want, take a look at the "WITH LOCATION" option for create database. Command: CREATE DATABASE Description: create a new database Syntax: CREATE DATABASE name [ [ WITH ] [ OWNER [=] dbowner ] [ LOCATION [=] 'dbpath' ] [ TEMPLATE [=] template ] [ ENCODING [=] encoding ] ] > Thanks, > > -Noah > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly -- Rod Taylor <rbt@rbt.ca> PGP Key: http://www.rbt.ca/rbtpub.asc
Attachment
Thanks, Can someone give me a good description of what the various directories and files actually are. I have RTFMed, but the descriptions there don't seem to match what I have on my machine. Thanks. On Tuesday, January 14, 2003, at 03:54 PM, Rod Taylor wrote: >> Do we need to configure something differently, or is this just how >> postgres works? > > Thats just how it works. Under 'base' there are a number of numbered > directories which represent various databases. > > If you really want, take a look at the "WITH LOCATION" option for > create > database. > > > Command: CREATE DATABASE > Description: create a new database > Syntax: > CREATE DATABASE name > [ [ WITH ] [ OWNER [=] dbowner ] > [ LOCATION [=] 'dbpath' ] > [ TEMPLATE [=] template ] > [ ENCODING [=] encoding ] ] > >> Thanks, >> >> -Noah >> >> >> ---------------------------(end of >> broadcast)--------------------------- >> TIP 3: if posting/reading through Usenet, please send an appropriate >> subscribe-nomail command to majordomo@postgresql.org so that your >> message can get through to the mailing list cleanly > -- > Rod Taylor <rbt@rbt.ca> > > PGP Key: http://www.rbt.ca/rbtpub.asc > <signature.asc>
Noah, > Can someone give me a good description of what the various directories > and files actually are. I have RTFMed, but the descriptions there > don't seem to match what I have on my machine. Within $PGDATA: /base is all database files unless you use WITH LOCATION /pg_clog is the Clog, which keeps a permanent count of transactions /pg_xlog is the transaction log (WAL) /global are a small number of relations, like pg_database or pg_user, which are available in all databases. -- -Josh Berkus Aglio Database Solutions San Francisco