Postgres82 startup broken

William C. Brennan compraxis2 at mac.com
Sun Apr 29 08:10:30 PDT 2007


I've just installed postgresql82-server (8.2.4) and discovered a 
problem with the instructions and
startup script supplied.  How do I communicate with the port maintainers?

My problems are as follows:
----------------------------
1. At the end of the installation, the following message is displayed 
in my terminal window:

     To create a database instance, after install do
      sudo mkdir -p /opt/local/var/db/postgresql82/defaultdb
      sudo chown postgres:postgres /opt/local/var/db/postgresql82/defaultdb
      sudo su postgres -c '/opt/local/lib/postgresql82/bin/initdb -D 
/opt/local/var/db/postgresql82/defaultdb'

The first two commands worked fine.  When I executed the "sudo su 
postgres -c '/opt/local...'" line, after entering
the admin password I would get the following error notification:

     su: /dev/null: Permission denied

Eventually I got around the problem by instead entering the command:
      sudo -u postgres bash -c '/opt/local...'
which worked.  (This is probably a little convoluted as "sudo -u 
postgres /opt/local..." should work too, I think.)

--------------------------------
2. In a similar fashion, the automatically installed file

 
/opt/local/etc/LaunchDaemons/org.macports/postgresql82-server/postgresql82-server.wrapper

had "su" lines which didn't succeed in starting up the postgresql 
server.  When I changed the lines from:
     su postgres -c "${PGCTL}...
to
     sudo -u postgres ${PGCTL}...

my postgresql server would be running after a reboot.

Frankly, I don't quite understand why the original version failed and 
my version succeeded.  I'm sure I know just enough to be dangerous.

--------------------------------

I'd appreciate it if someone could verify that the startup 
instruction and wrapper file are incorrect, or tell me that they are 
correct and that I had done something wrong.

Thanks!

-- Bill



More information about the macports-users mailing list