Re: Upgrading to 8.4 - Mailing list pgsql-novice

From Tom Lane
Subject Re: Upgrading to 8.4
Date
Msg-id 3460.1266805751@sss.pgh.pa.us
Whole thread Raw
In response to Upgrading to 8.4  (bill house <wchouse@bellsouth.net>)
List pgsql-novice
bill house <wchouse@bellsouth.net> writes:
> root on pts/5 barney2.test.lcl:/usr/local/pgsql
> # l
> total 78656
> drwxr-xr-x  7 root     root         4096 2010-02-21 19:14 .
> drwxr-xr-x 13 root     root         4096 2010-02-21 17:12 ..
> -rw-r--r--  1 postgres postgres      467 2010-02-21 19:08 .bash_profile
> drwxr-xr-x  2 root     root         4096 2010-02-21 17:13 bin
> drwx------ 11 postgres root         4096 2010-02-21 18:09 data
> drwxr-xr-x  6 root     root         4096 2010-02-21 17:13 include
> drwxr-xr-x  3 root     root         4096 2010-02-21 17:13 lib
> -rw-r--r--  1 postgres postgres 80419764 2010-02-21 19:26
>                                                          pg_dumpall_20100219.sql
> -rw-r--r--  1 postgres postgres       14 2010-02-21 19:17 .psql_history
> drwxr-xr-x  7 root     root         4096 2010-02-21 17:13 share

Not sure how you got into that state, but having postgres' home
directory owned by root isn't a particularly good idea.  The same
statement would apply for any non-root account.

> 1) Is is necessary/wise/secure to have postgres' home directory the
> working area of the server? If not, what is a recommended alternative
> home?

The data directory can be anywhere as long as it's owned by the postgres
user.

> 2) After the installation, the owner/group of these files should be?

See above.

> 3) Is there a startup script for inclusion in /etc/init.d contained in
> the source code package? If so which is it?

You can look in contrib/start-scripts, but that script is pretty crude.
In most cases it would be better to borrow the postgres start script
used by whatever distro you're on.

            regards, tom lane

pgsql-novice by date:

Previous
From: bill house
Date:
Subject: Upgrading to 8.4
Next
From: dipti shah
Date:
Subject: What is unsecure postgres languages? How to disable them?