Re: Question: drop database problem

From: Ben Kim <bkim(at)coe(dot)tamu(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Question: drop database problem
Date: 2004-10-26 02:41:18
Message-ID: Pine.GSO.4.10.10410252126080.23723-100000@edsun.coe.tamu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


Many thanks for the advice.

I'm starting it with something like the following, as root in /etc/init.d
script.

su pgsql -c "/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data
-p /usr/local/pgsql/bin/postmaster start"

And pgsql has PGDATA3 defined in .cshrc.

The PGDATA3 is not being used for new databases. I guess I need to refine
the startup script if for the rest of the databases.

Will I have to shut down the server and restart it (introduce PGDATA3
properly) before I can drop that particular database?

Regards,

Ben Kim
Database Developer/Systems Administrator
College of Education
Texas A&M University

On Mon, 25 Oct 2004, Tom Lane wrote:

> Ben Kim <bkim(at)coe(dot)tamu(dot)edu> writes:
> > pgsql=# drop database mydb;
> > ERROR: Postmaster environment variable 'PGDATA3' not set
>
> > The database owner is pgsql, and if I echo $PGDATA3 as the owner, it
> > returns a valid directory. Also, the datpath is correct.
>
> You have $PGDATA3 set in your interactive environment, but evidently not
> in the environment of the postmaster process. How are you starting the
> postmaster exactly, and where are you expecting it to get $PGDATA3 from?
>
> > Also, I have several databases sharing the datpath of PGDATA3. Is there a
> > system table associating the datpath and the actual OS path?
>
> No, just the environment variable. (This is all changing in 8.0 with
> tablespaces, thank goodness.)
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Nikhil Parva 2004-10-26 02:47:29 unregister
Previous Message aditya s 2004-10-26 01:56:10 Running pgreplicator 1.1.0 in redhat linux 9.0