Subject: HELP!

From: [email-masked] (Venkatesan T Ramaswamy)
Date: Thu, 7 Oct 1993 22:58:59 -0500 (CDT)

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

---

From: "Oscar Linares M.D." <[email-masked]>
Date: Fri, 8 Oct 1993 12:38:16 -0400 (EDT)

> Could you please tell me what is wrong?

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