* P?ter Kov?cs <peter.kovacs.1.0rc at gmail.com> [2007-02-14 12:28]: > I suspect that Sun's "official" documentation for PostgreSQL's SMF > integration > (http://www.sun.com/software/solaris/howtoguides/postgresqlhowto.jsp#2) > is not what the PostgreSQL folks would readily call "carefully > written": > http://archives.postgresql.org/pgsql-admin/2007-02/msg00169.php. > > The crux is that the "parent" postmaster process should be started by > a process which itself is not owned by the "postgres" user - if my > understanding of the PostgreSQL recommendation is correct. I do not > know how to achieve this behaviour with SMF, but I suspect that above > mentionned Sun documentation does not do it. > > Any comment appreciated.
Well, the latter post suggests su -l postgres -c "/usr/bin/postmaster ... &" >> "$PGLOG" 2>&1 < /dev/null so I would suggest using a start method with a method credential of "postgres", with a duration of contract, would be equivalent. (svc.startd is not running as the postgres user.) This is in fact what the earlier reference suggests, as far as I can see--it has method_contexts that select the postgres user. (It does appear to conflict with the separate IDs for separate postgres instances. Is that your concern?) - Stephen -- Stephen Hahn, PhD Solaris Kernel Development, Sun Microsystems stephen.hahn at sun.com http://blogs.sun.com/sch/