X-Original-To: pgsql-ports-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E4BAC52EB4 for ; Tue, 26 Jul 2005 14:06:04 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 89345-07 for ; Tue, 26 Jul 2005 17:06:01 +0000 (GMT) Received: from mail28.sea5.speakeasy.net (mail28.sea5.speakeasy.net [69.17.117.30]) by svr1.postgresql.org (Postfix) with ESMTP id AB87652C76 for ; Tue, 26 Jul 2005 14:05:54 -0300 (ADT) Received: (qmail 14242 invoked from network); 26 Jul 2005 17:05:55 -0000 Received: from ns1.presence-group.net (HELO [172.30.11.6]) (blakers@[216.27.177.134]) (envelope-sender ) by mail28.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 26 Jul 2005 17:05:54 -0000 Date: Tue, 26 Jul 2005 10:05:52 -0700 From: OpenMacNews Reply-To: OpenMacNews To: pgsql-ports@postgresql.org Cc: ntulach@mac.com Subject: starting PgSQL w/ launchd on OSX 10.4.2 Message-ID: X-Mailer: Mulberry/4.0.1 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200507/21 X-Sequence-Number: 2161 hi all, after much help/education elsewhere re: building a launchd .plist for apache2, etc., i'm on to postgresql ... my 'original' and fully functional StartupItem string(s) for pgsql is(are): cd /var/Settings/PgSQL/ sudo -u pgsuser sh -c "nohup /usr/local/pgsql/bin/postmaster -d 5 -n -i -h 10.0.0.6 -D /var/Data/PgSQL -c config_file=/var/Settings/PgSQL/postgresql.conf >/var/Logs/postgresql_stderror.log &" never a problem with it ... and any/all attempts to use/launch are correctly AND informatively/verbosely logged in BOTH my system.log & postgresql_stderror. now, on to a launchd .plist ... i've googled for scripts online (e.g., here: N Tulach, ), and with a few mods am using: ========================================================== Disabled Debug OnDemand Label org.postgresql.postmaster ServiceDescription PostgreSQL 8 Server UserName pgsuser GroupName pgsuser WorkingDirectory /var/Settings/PgSQL StandardOutPath /var/Logs/postgresql_stderror.log StandardErrorPath /var/Logs/postgresql_stderror.log ProgramArguments /usr/local/pgsql/bin/postmaster -d 5 -n -i -h 10.0.0.6 -D /var/Data/PgSQL -c config_file=/var/Settings/PgSQL/postgresql.conf -c log_filename=/var/Logs/postgresql_stderror.log ========================================================== on 'launchctl load', my syslog shows only (again!): Jul 26 09:21:54 devuser launchd: org.postgresql.postmaster: exited with exit code: 1 Jul 26 09:21:54 devuser launchd: org.postgresql.postmaster: respawning too quickly! throttling Jul 26 09:21:54 devuser launchd: org.postgresql.postmaster: 9 more failures without living at least 60 seconds will cause job removal Jul 26 09:21:54 devuser launchd: org.postgresql.postmaster: will restart in 10 seconds with apache, these errors were elim'd by a combo of: adding "-D FOREGROUND" removing UserName & GroupName with PostgreSQL, however (from ): "Thus, the simplest way to start the server is: $ postmaster -D /usr/local/pgsql/data which will leave the server running in the foreground. This must be done while logged into the PostgreSQL user account" which would seem to indicate that: (a) postmaster DEFAULTS to the foreground, and hence, does NOT need a flag to do so (b) postmaster must be run as the postgresql user/group QUESTIONS: any ideas why launchd is 'acting up' w.r.t PostgreSQL? and, what to do abt it? cheers, richard