Return-Path: owner-postman Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id BAA18597 for postgres-redist; Mon, 11 Jul 1994 01:04:01 -0700 Resent-From: POSTGRES mailing list Resent-Message-Id: <199407110804.BAA18597@nobozo.CS.Berkeley.EDU> Sender: owner-postman@postgres.Berkeley.EDU X-Return-Path: owner-postman Received: from faerie.CS.Berkeley.EDU (faerie.CS.Berkeley.EDU [128.32.149.14]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with ESMTP id BAA18587 for ; Mon, 11 Jul 1994 01:04:00 -0700 Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by faerie.CS.Berkeley.EDU (8.6.4/8.1B) with SMTP id BAA13132; Mon, 11 Jul 1994 01:03:15 -0700 Message-Id: <199407110803.BAA13132@faerie.CS.Berkeley.EDU> X-Authentication-Warning: faerie.CS.Berkeley.EDU: Host localhost.Berkeley.EDU didn't use HELO protocol From: aoki@CS.Berkeley.EDU (Paul M. Aoki) To: toncan@cse.unsw.edu.au (Toncan Duong) Cc: postgres@postgres.Berkeley.EDU Subject: Re: Is that possible to set PGDATA at run time? Reply-To: aoki@CS.Berkeley.EDU (Paul M. Aoki) In-reply-to: Your message of Mon, 11 Jul 1994 14:53:17 +1000 (EST) <940711045318.2791@cse.unsw.edu.au> Date: Mon, 11 Jul 94 01:03:15 -0700 X-Sender: aoki@postgres.Berkeley.EDU Resent-To: postgres-redist@postgres.Berkeley.EDU X-Mts: smtp Resent-Date: Mon, 11 Jul 94 01:04:01 -0700 Resent-XMts: smtp 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. ==============================================================================