Re: Postgres file structure doubt - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Postgres file structure doubt
Date
Msg-id dcc563d10711190938p24f4b517je259283c4e6990c7@mail.gmail.com
Whole thread Raw
In response to Postgres file structure doubt  (mailtolouis2020-postgres@yahoo.com)
List pgsql-general
On Nov 19, 2007 11:24 AM,  <mailtolouis2020-postgres@yahoo.com> wrote:
>
> Hi everyone,
>
> Got a doubt in my setup, please correct me if I'm wrong.
>
> In my postgres setup,
> /usr/local/pgsql (where postgres install)
> /usr/local/pgsql/data (PGDATA)
> /database/pg/mydata (tablespace which use for all the table I create)
> /database/pg/myindex (index which use for all the table I create)
>
> 1) In this setup, the actual user data are store in PGDATA
> the table structure & index are store in /database/pg/mydata &
> /database/pg/myindex
>
> Am I correct?

The data that defines users, and tables, and other objects are in
PGDATA.  The data from users are stored in mydata/myindex.  Not sure
if that matches what you wrote or not...

> 2) So to backup (not pg_dump), I should make sure it include these 2 folder
> right?
>
> /usr/local/pgsql/data
> /database/pg/

To backup, you should generally use pg_dump.  Are you planning on
using PITR?  Are you planning on shutting down your database when you
back it up?  if you're not using PITR, you must shut down postgresql
to take a file system backup.

> 3) I think my setup is not quite right, I should move the PGDATA to
> /database/pg right?

Sorta a personaly choice really.

pgsql-general by date:

Previous
From: mailtolouis2020-postgres@yahoo.com
Date:
Subject: Postgres file structure doubt
Next
From: Bruce Momjian
Date:
Subject: Re: Postgre and XML