public inbox for [email protected]  
help / color / mirror / Atom feed
Wrong startup script of PostgreSQL 9.1.2 under OpenBSD 5.1
5+ messages / 3 participants
[nested] [flat]

* Wrong startup script of PostgreSQL 9.1.2 under OpenBSD 5.1
@ 2012-09-25 06:37  Denis Lapshin <[email protected]>
  0 siblings, 1 reply; 5+ messages in thread

From: Denis Lapshin @ 2012-09-25 06:37 UTC (permalink / raw)
  To: pgsql-docs

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

Please correct your manual pages ASAP in order to prevent spending
time to fix it.

Denis




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Wrong startup script of PostgreSQL 9.1.2 under OpenBSD 5.1
@ 2012-09-25 17:02  Tom Lane <[email protected]>
  parent: Denis Lapshin <[email protected]>
  0 siblings, 1 reply; 5+ messages in thread

From: Tom Lane @ 2012-09-25 17:02 UTC (permalink / raw)
  To: Denis Lapshin <[email protected]>; +Cc: pgsql-docs

Denis Lapshin <[email protected]> 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




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Wrong startup script of PostgreSQL 9.1.2 under OpenBSD 5.1
@ 2012-09-25 17:07  =?iso-8859-2?Q?Hidv=E9gi_G=E1bor?= <[email protected]>
  parent: Tom Lane <[email protected]>
  0 siblings, 2 replies; 5+ messages in thread

From: =?iso-8859-2?Q?Hidv=E9gi_G=E1bor?= @ 2012-09-25 17:07 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; Denis Lapshin <[email protected]>; +Cc: pgsql-docs

Hello there,

I have already posted this problem several months ago, there was no change 
in the documentation since then. It's not about the installation directory 
or username, under the new OpenBSD's the parameter ordering of 'su' differs 
from the older versions, the right order is like Denis writes.

Gábor Hidvégi


----- Original Message ----- 
From: "Tom Lane" <[email protected]>
To: "Denis Lapshin" <[email protected]>
Cc: <[email protected]>
Sent: Tuesday, September 25, 2012 7:02 PM
Subject: Re: [DOCS] Wrong startup script of PostgreSQL 9.1.2 under OpenBSD 
5.1


> Denis Lapshin <[email protected]> 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
>
>
> -- 
> Sent via pgsql-docs mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-docs
> 





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Wrong startup script of PostgreSQL 9.1.2 under OpenBSD 5.1
@ 2012-09-25 17:25  Tom Lane <[email protected]>
  parent: =?iso-8859-2?Q?Hidv=E9gi_G=E1bor?= <[email protected]>
  1 sibling, 0 replies; 5+ messages in thread

From: Tom Lane @ 2012-09-25 17:25 UTC (permalink / raw)
  To: =?iso-8859-2?Q?Hidv=E9gi_G=E1bor?= <[email protected]>; +Cc: Denis Lapshin <[email protected]>; pgsql-docs

=?iso-8859-2?Q?Hidv=E9gi_G=E1bor?= <[email protected]> writes:
> I have already posted this problem several months ago, there was no change 
> in the documentation since then. It's not about the installation directory 
> or username, under the new OpenBSD's the parameter ordering of 'su' differs 
> from the older versions, the right order is like Denis writes.

Ah, okay (and I confirmed this with a bit of googling).  Will fix,
thanks for the explanation.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Wrong startup script of PostgreSQL 9.1.2 under OpenBSD 5.1
@ 2012-09-25 17:41  Tom Lane <[email protected]>
  parent: =?iso-8859-2?Q?Hidv=E9gi_G=E1bor?= <[email protected]>
  1 sibling, 0 replies; 5+ messages in thread

From: Tom Lane @ 2012-09-25 17:41 UTC (permalink / raw)
  To: =?iso-8859-2?Q?Hidv=E9gi_G=E1bor?= <[email protected]>; +Cc: Denis Lapshin <[email protected]>; pgsql-docs

=?iso-8859-2?Q?Hidv=E9gi_G=E1bor?= <[email protected]> writes:
> I have already posted this problem several months ago, there was no change 
> in the documentation since then. It's not about the installation directory 
> or username, under the new OpenBSD's the parameter ordering of 'su' differs 
> from the older versions, the right order is like Denis writes.

BTW, a little further googling turns up the information that this isn't
OpenBSD-specific; there are a number of platforms where "su -c" doesn't
act like it does on Linux.  But "su username -c 'command'" works the
same everywhere.  I'll adjust the generic text as well as the OpenBSD
paragraph in light of this.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2012-09-25 17:41 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-09-25 06:37 Wrong startup script of PostgreSQL 9.1.2 under OpenBSD 5.1 Denis Lapshin <[email protected]>
2012-09-25 17:02 ` Tom Lane <[email protected]>
2012-09-25 17:07   ` =?iso-8859-2?Q?Hidv=E9gi_G=E1bor?= <[email protected]>
2012-09-25 17:25     ` Tom Lane <[email protected]>
2012-09-25 17:41     ` Tom Lane <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox