From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ben Kim <bkim@coe.tamu.edu>
Cc: pgsql-admin@postgresql.org
Subject: Re: Question: drop database problem
Date: Mon, 25 Oct 2004 23:13:39 -0400
Message-ID: <3852.1098760419@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.GSO.4.10.10410252126080.23723-100000@edsun.coe.tamu.edu>
References: <Pine.GSO.4.10.10410252126080.23723-100000@edsun.coe.tamu.edu>
Ben Kim <bkim@coe.tamu.edu> writes:
> 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.
su is most likely executing its -c command with /bin/sh, which will pay
zero attention to .cshrc. You may need to set up a .profile as well as
.cshrc. Also, I think that su won't cause *any* of these setup scripts
to be executed unless you use the "-" or "-l" options; a bare su just
runs the command in your current root environment.
This stuff varies across different Unix variants, but it's uniformly
a source of gotchas :-(. Read your su and shell man pages carefully.
> Will I have to shut down the server and restart it (introduce PGDATA3
> properly) before I can drop that particular database?
Yeah. That part's not so hard: if you restart the postmaster manually
then it will inherit your interactive variables. But I do *not*
recommend that, because it'll break after your next reboot. You need to
do the legwork to be sure that the variables show up in the basic
boot-time context.
Again, this definitely sucks, and we are moving away from it as fast as
we can. But that's where things stand in current releases.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, bkim@coe.tamu.edu
Subject: Re: Question: drop database problem
In-Reply-To: <3852.1098760419@sss.pgh.pa.us>
References: <Pine.GSO.4.10.10410252126080.23723-100000@edsun.coe.tamu.edu> <3852.1098760419@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox