Return-Path: postman 
Delivery-Date: Fri, 08 Oct 93 09:48:01 PDT
Return-Path: postman
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA15820; Fri, 8 Oct 93 09:45:26 -0700
Resent-From: postman (POSTGRES mailing list)
Resent-Message-Id: <9310081645.AA15820@postgres.Berkeley.EDU>
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: oscar@mail.msen.com
Received: from garnet.msen.com by postgres.Berkeley.EDU (5.61/1.29)
	id AA15812; Fri, 8 Oct 93 09:45:19 -0700
Received: by garnet.msen.com (Smail3.1.28.1 #11)
	id m0olKyi-000EZmC; Fri, 8 Oct 93 12:47 EDT
Date: Fri, 8 Oct 1993 12:38:16 -0400 (EDT)
From: "Oscar Linares M.D." <oscar@mail.msen.com>
Subject: Re: HELP!
To: Venkatesan T Ramaswamy <venkat@math.luc.edu>
Cc: postgres mail-list <postgres@postgres.Berkeley.EDU>
In-Reply-To: <9310080359.AA04720@dedekind.math.luc.edu>
Message-Id: <Pine.3.07.9310081212.A9960-b100000@garnet.msen.com>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Resent-To: postgres-dist
Resent-Date: Fri, 08 Oct 93 09:45:25 PDT



On Thu, 7 Oct 1993, Venkatesan T Ramaswamy wrote:

> Hi!
> 
> I installed POSTGRES yesterday and it was all fine.
> 
> I have installed it in the $HOME directory of the user named postgres.
> 
> Yesterday all the data files were moved to a new hard disk by our system administrator. 
> 
> Today I get the following errors:
> 
> 
> %createdb foo
> FATAL 1:Oct  7 22:52:57:database template1 does not exist, bailing out...
> /db/postgres/bin/createdb: database creation failed on foo.
> %initdb
> initdb: error:  files not there
> initdb: bmake install has not been run or you're trying to run initdb on a
> initdb: machine that does not store the database (PGHOST doesn't work for this)
> %ps
>   PID TT STAT  TIME COMMAND
>  3267 pd IW    0:00 -csh (csh)
>  4075 q1 S     0:01 -csh (csh)
>  4694 q1 S     0:00 postmaster
>  4714 q1 R     0:00 ps
> %pwd
> /db/postgres/src
> %echo $PGDATA
> /db/postgres
> 
> 
> 
> 
> Could you please tell me what is wrong?
> 
> Thank you,
> 
> Yours sincerely,
> venkat

This really is a problem! As you know, when you did all your set-up work,
a directory "Data" was created in your $HOME/postgress. When you initdb,
you get a working system there with your pg_database, pg_usr, pg_defaults,
etc... It is a problem because your initdb information stores alot of
important information in that directory. Now, you move the data files, but
your set-up files are looking for it where they were originally. 

You will find this info in the documentation, also, it warns against this
type of thing (moving things around on the system).

I suggest you create a link from your "Data" directory to where your sa
moved the data files ( the easiest solution).

e.g., ln -s /where/sa/put/data $HOME/postgress/Data

Good luck and don't despair,

OAL



