Rich Shepard wrote:
 
> On Sat, 27 Nov 1999, Lamar Owen wrote:
 
> > 700 is the right permissions -- make sure that the postgres user is the
> > owner of the PGDATA2.

>   Ah, ha! That must be the problem. The definition of PGLIB, PGDATA and
> PGDATA2 are in *my* ~/.bash_profile. When I was logged in as postgres, I
> set up user 'rshepard' with permission to create databases. But, when user
> 'rshepard' tries to create a database, the attempt fails.

Hmmmm.. Without any of the PostgreSQL envvars defined, on 6.5.3, I (as
user lowen) can successfully create and destroy db's -- lowen has create
database rights.

>   Since the /home directory for user 'postgres' is /var/lib/pgsql, where do
> I put the environment variables which define PGLIB, PGDATA and PGDATA2?
> Especially so that the locations are available to other authorized database
> creators and users?

/etc/profile is the place to put that so that all users (using the
standard /bin/sh) can access the envvars.  Although I have been looking
at putting those sort of configuration items into an /etc script that
can then be sourced.

Amazingly enough, I've never had the need of separately defining those
environment variables in my applications, as the only place they are
essential is when starting the postmaster (and I use the -D switch to
postmaster in the RPM init script to start postmaster -- PGDATA and
PGLIB are never defined (although they need to be, to prevent
problems)).  The PGPORT envvar becomes important for psql (IIRC).

Many of these RedHat assumptions and artifacts are going away with the
version 7.0 RPM's.

Oh, BTW, I think the regression results you mailed me are due to locale
settings, as they seem to all be collation-order-dependent.

The RPM environment is substantially different in scope and attitude
than the typical PostgreSQL installation, since RedHat elected, back at
RH Linux version 5.0, to ship PostgreSQL RPM's as part of the base
distribution -- which meant things had to be moved around due to
RedHat's desire to be FHS 2.0 compliant (the short of it is that an FHS
2.0 compliant distribution cannot touch /usr/local in any way, shape, or
form).

HTH
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

************

Reply via email to