Re: freebsd sample startup script doesn't work

From: Palle Girgensohn <girgen(at)partitur(dot)se>
To: Vivek Khera <khera(at)kcilink(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: freebsd sample startup script doesn't work
Date: 2001-05-08 12:36:19
Message-ID: 3AF7E843.A2686F75@partitur.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

You should really use the port. it has a working startup
script, and it creates a pgsql/.profile for you. Using su -m is
more error prone IMHO. It will export locales and such, that
you really don't want to export to postmaster.

/Palle

Vivek Khera wrote:
>
> I installed the sample startup script for postgres for FreeBSD, but it
> reports the following error upon running:
>
> # /usr/local/etc/rc.d/postgres.sh start
> pg_ctl: no database directory or environment variable $PGDATA is specified
> Try 'pg_ctl --help' for more information.
>
> I see clearly that PGDATA is set and exported. I'm suspecting that
> the "su -l" causes the environment to disappear. My guess is that
> whomever wrote this script has PGDATA set in the ~/.profile (or
> equivalent) in the postgres user's home directory.
>
> Thus, it is pointless to set PGDATA in the script. Setting and
> exporting PGDATA in the ~/.profile file lets postgres start as
> expected.
>
> The commentary says to copy the file to /usr/local/etc/rc.d/postgresql
> but this is not useful; the file must in '.sh' and be executable or
> FreeBSD will ignore it on boot.
>
> Also, the following line in the start action of the sript is useful:
>
> /sbin/ldconfig -m $prefix/lib
>
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Vivek Khera, Ph.D. Khera Communications, Inc.
> Internet: khera(at)kciLink(dot)com Rockville, MD +1-240-453-8497
> AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://www.postgresql.org/search.mpl

--
Partitur Informationsteknik AB
Wenner-Gren Center +46 8 566 280 02
113 46 Stockholm +46 70 785 86 02
Sweden girgen(at)partitur(dot)se

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Черепанов Леонид 2001-05-08 13:20:20 Terrible perfomance during nested "... where x in (select ...)" operator
Previous Message Chris Storah 2001-05-08 09:37:56 Re: 7.1 euro-style dates insert error