Newbie struggling to set $PGDATA

From: Geoff Caplan <geoff(at)productivity(dot)co(dot)uk>
To: Postgres General <pgsql-general(at)postgresql(dot)org>, Steve Wampler <swampler(at)noao(dot)edu>
Subject: Newbie struggling to set $PGDATA
Date: 2001-04-25 14:12:26
Message-ID: 14017546150.20010425151226@productivity.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello Steve,

Thursday, April 19, 2001, 4:53:58 PM, you wrote:

SW> I just upgraded from 7.0.3 to 7.1 (using the RH rpms) with no
SW> major problems. Nice!

SW> However, I'm getting some strange behaviour from the init
SW> script (/etc/rc.d/init.d/postgresql). In particular, a
SW> restart when the database is running fails because the
SW> "sleep 2" in stop() is no longer long enough (on a dual-cpu
SW> PIII/650 machine!). So "pidof postmaster" returns a non-null
SW> value and *that* results in a syntax error:

SW> Checking postgresql installation: [ OK ]
SW> ./postgresql: [: 18209: unary operator expected

SW> (I think the test should become something like "if [ -n "$pid" ];..."
SW> instead of just "if [ $pid ]", which at least prevents the
SW> syntax error...)

SW> Of course, fixing the syntax error isn't the main problem, which
SW> is that the shutdown of the old postmaster(s) hasn't completed yet,
SW> resulting in a "false positive" from the pidof operation.

SW> I bumped the "sleep 2" up to "sleep 5" and the problem went away.
SW> Surely there's a better fix?

Hi

Please help out a Linx/Postgres newbie.

I simply want to set the $PGDATA environmental variable, but can't
figure out how. The docs assume you already know...

I have tried setting it in my bash /etc/profile configuration file,
and it shows up ok if I "echo $PGDATA" in the shell. But none of the
postgres utilities such as "initdb" seem to be able to find it.

What don't I understand? I have already checked the docs/GreatBridge
manual/faqs/archive, so I would very much appreciate some help.

Geoff Caplan

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lieven Van Acker 2001-04-25 14:17:33 Joined table view - multiple delete action rule
Previous Message Rich Handler 2001-04-25 11:09:39 Problem importing auto-increment fields in MS Access to PostgreSQL