Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TGYX5-0008Nz-0G for pgsql-docs@postgresql.org; Tue, 25 Sep 2012 17:02:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TGYX2-00005j-TR for pgsql-docs@postgresql.org; Tue, 25 Sep 2012 17:02:50 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q8PH2kaD022924; Tue, 25 Sep 2012 13:02:46 -0400 (EDT) From: Tom Lane To: Denis Lapshin cc: pgsql-docs@postgresql.org Subject: Re: Wrong startup script of PostgreSQL 9.1.2 under OpenBSD 5.1 In-reply-to: References: Comments: In-reply-to Denis Lapshin message dated "Tue, 25 Sep 2012 10:37:35 +0400" Date: Tue, 25 Sep 2012 13:02:45 -0400 Message-ID: <22923.1348592565@sss.pgh.pa.us> X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201209/22 X-Sequence-Number: 7474 Denis Lapshin writes: > On page http://www.postgresql.org/docs/9.1/interactive/server-start.html > was published a wrong startup script for automatic starting PostgeSQL > during boot under OpenBSD. > Here is a working one which should be placed into /etc/rc.local file: > if [ -x /usr/local/bin/pg_ctl -a -x /usr/local/bin/postgres ]; then > su - _postgresql -c '/usr/local/bin/pg_ctl -D /var/postgresql/data > start -l /var/postgresql/logfile -s' > echo -n 'postgresql' > fi Right offhand it's not apparent to me that either of these can be said to be "right" or "wrong". You are making different assumptions about the installation directory and user name than what is in the documentation, but your assumptions aren't more right than the docs'. As stated there, the examples use generic choices that may need to be adjusted for particular systems. regards, tom lane