agora inbox for postgres@postgres.berkeley.edu  
help / color / mirror / Atom feed
From: Paul M. Aoki <aoki@CS.Berkeley.EDU>
To: Toncan Duong <toncan@cse.unsw.edu.au>
Cc: postgres@postgres.Berkeley.EDU
Subject: Re: Is that possible to set PGDATA at run time?
Date: Mon, 11 Jul 94 01:03:15 -0700
Message-ID: <199407110803.BAA13132@faerie.CS.Berkeley.EDU> (raw)
In-Reply-To: <940711045318.2791@cse.unsw.edu.au>

toncan@cse.unsw.edu.au (Toncan Duong) writes:
> Is that possible to set the PGDATA at run-time?

it depends on what you mean by "run-time."  it only matters when 
running the initialization utilities (initdb, newbki, cleardbdir),
which are only run while installing the system, and the postmaster.
none of the other programs look at it.

> What we want to achieve is to run the postgres backend/frontend at a
> machine different from the machine where the data directory is stored.

backends always run on the same machine as the postmaster, because
they are child processes of the postmaster.  the postmaster must be 
started on the machine where the data files are located.

the frontend can be on any machine.

(the process architecture is explained in the user manual..)

> It appears that excutables such as monitor, createdb, createuser, etc. 
> read/write to the directory that has been set at compilation.

no.  the backend servers started by those commands use the 
directory set at compilation, unless the postmaster was started
with PGDATA set to a different directory (or with the -D option).

> (Went through the manual of 4.2. Haven't found any info. on the setting
> of environment variables like PGDATA.)

there isn't much to explain about PGDATA since, after the data
directory has been initialized, it is only used by the postmaster.
look at the "postmaster" man page.  there's also a brief mention
in the user manual.
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  aoki@CS.Berkeley.EDU
                |  Berkeley, CA 94720-1776      |  ...!uunet!ucbvax!aoki

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"

   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: postgres@postgres.berkeley.edu
  Cc: aoki@CS.Berkeley.EDU, toncan@cse.unsw.edu.au
  Subject: Re: Is that possible to set PGDATA at run time?
  In-Reply-To: <199407110803.BAA13132@faerie.CS.Berkeley.EDU>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox