Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7d8cbeb

Browse files
committed
Fix examples of how to use "su" while starting the server.
The syntax "su -c 'command' username" is not accepted by all versions ofsu, for example not OpenBSD's. More portable is "su username -c'command'". So change runtime.sgml to recommend that syntax. Also,add a -D switch to the OpenBSD example script, for consistency with otherexamples. Per Denis Lapshin and Gábor Hidvégi.
1 parent2a0c81a commit7d8cbeb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎doc/src/sgml/runtime.sgml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,10 @@ pg_ctl start -l logfile
286286
<filename>rc.d</> directories. Whatever you do, the server must be
287287
run by the <productname>PostgreSQL</productname> user account
288288
<emphasis>and not by root</emphasis> or any other user. Therefore you
289-
probably should form your commands using <literal>su -c '...'
290-
postgres</literal>. For example:
289+
probably should form your commands using
290+
<literal>supostgres -c '...'</literal>. For example:
291291
<programlisting>
292-
su -c 'pg_ctl start -D /usr/local/pgsql/data -l serverlog' postgres
292+
supostgres-c 'pg_ctl start -D /usr/local/pgsql/data -l serverlog'
293293
</programlisting>
294294
</para>
295295

@@ -315,7 +315,7 @@ su -c 'pg_ctl start -D /usr/local/pgsql/data -l serverlog' postgres
315315
<indexterm><primary>OpenBSD</><secondary>start script</secondary></>
316316
<programlisting>
317317
if [ -x /usr/local/pgsql/bin/pg_ctl -a -x /usr/local/pgsql/bin/postgres ]; then
318-
su --c '/usr/local/pgsql/bin/pg_ctl start -l /var/postgresql/log -s' postgres
318+
su -l postgres-c '/usr/local/pgsql/bin/pg_ctl start -s -l /var/postgresql/log -D /usr/local/pgsql/data'
319319
echo -n ' postgresql'
320320
fi
321321
</programlisting>
@@ -738,7 +738,7 @@ psql: could not connect to server: No such file or directory
738738
<indexterm><primary>FreeBSD</><secondary>IPC configuration</></>
739739
<listitem>
740740
<para>
741-
The default settings can be changed using
741+
The default settings can be changed using
742742
the <command>sysctl</command> or
743743
<command>loader</command> interfaces. The following
744744
parameters can be set using <command>sysctl</command>:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp