📄 postgres-ref.sgml
字号:
<varlistentry> <term><option>-N</option></term> <listitem> <para> Disables use of newline as a statement delimiter. </para> </listitem> </varlistentry> </variablelist> </refsect2> <refsect2> <title>Semi-internal Options</title> <para> There are several other options that may be specified, used mainly for debugging purposes. These are listed here only for the use by <productname>PostgreSQL</productname> system developers. <emphasis>Use of any of these options is highly discouraged.</emphasis> Furthermore, any of these options may disappear or change in a future release without notice. </para> <variablelist> <varlistentry> <term><option>-f</option> <literal>{ s | i | m | n | h }</literal></term> <listitem> <para> Forbids the use of particular scan and join methods: <literal>s</literal> and <literal>i</literal> disable sequential and index scans respectively, while <literal>n</literal>, <literal>m</literal>, and <literal>h</literal> disable nested-loop, merge and hash joins respectively. </para> <note> <para> Neither sequential scans nor nested-loop joins can be disabled completely; the <literal>-fs</literal> and <literal>-fn</literal> options simply discourage the optimizer from using those plan types if it has any other alternative. </para> </note> </listitem> </varlistentry> <varlistentry> <term><option>-O</option></term> <listitem> <para> Allows the structure of system tables to be modified. This is used by <command>initdb</command>. </para> </listitem> </varlistentry> <varlistentry> <term><option>-p</option> <replaceable class="parameter">database</replaceable></term> <listitem> <para> Indicates that this process has been started by a <command>postmaster</command> and specifies the database to use. etc. </para> </listitem> </varlistentry> <varlistentry> <term><option>-t</option> <literal>pa[rser] | pl[anner] | e[xecutor]</literal></term> <listitem> <para> Print timing statistics for each query relating to each of the major system modules. This option cannot be used together with the <option>-s</option> option. </para> </listitem> </varlistentry> <varlistentry> <term><option>-v</option> <replaceable class="parameter">protocol</replaceable></term> <listitem> <para> Specifies the version number of the frontend/backend protocol to be used for this particular session. </para> </listitem> </varlistentry> <varlistentry> <term><option>-W</option> <replaceable class="parameter">seconds</replaceable></term> <listitem> <para> As soon as this option is encountered, the process sleeps for the specified amount of seconds. This gives developers time to attach a debugger to the server process. </para> </listitem> </varlistentry> <varlistentry> <term><option>--describe-config</option></term> <listitem> <para> This option dumps out the server's internal configuration variables, descriptions, and defaults in tab-delimited <command>COPY</> format. It is designed primarily for use by administration tools. </para> </listitem> </varlistentry> </variablelist> </refsect2> </refsect1> <refsect1> <title>Environment</title> <variablelist> <varlistentry> <term><envar>PGDATA</envar></term> <listitem> <para> Default data direction location </para> </listitem> </varlistentry> </variablelist> <para> For others, which have little influence during single-user mode, see <xref linkend="app-postmaster">. </para> </refsect1> <refsect1> <title>Notes</title> <para> To cancel a running query, send the <literal>SIGINT</literal> signal to the <command>postgres</command> process running that command. </para> <para> To tell <command>postgres</command> to reload the configuration files, send a <literal>SIGHUP</literal> signal. Normally it's best to <literal>SIGHUP</literal> the <command>postmaster</command> instead; the <command>postmaster</command> will in turn <literal>SIGHUP</literal> each of its children. But in some cases it might be desirable to have only one <command>postgres</command> process reload the configuration files. </para> <para> The <command>postmaster</command> uses <literal>SIGTERM</literal> to tell a <command>postgres</command> process to quit normally and <literal>SIGQUIT</literal> to terminate without the normal cleanup. These signals <emphasis>should not</emphasis> be used by users. It is also unwise to send <literal>SIGKILL</literal> to a <command>postgres</command> process --- the <command>postmaster</command> will interpret this as a crash in <command>postgres</command>, and will force all the sibling <command>postgres</command> processes to quit as part of its standard crash-recovery procedure. </para> </refsect1> <refsect1> <title>Usage</title> <para> Start a stand-alone server with a command like<screen><userinput>postgres -D /usr/local/pgsql/data <replaceable>other-options</> my_database</userinput></screen> Provide the correct path to the database directory with <option>-D</>, or make sure that the environment variable <envar>PGDATA</> is set. Also specify the name of the particular database you want to work in. </para> <para> Normally, the stand-alone server treats newline as the command entry terminator; there is no intelligence about semicolons, as there is in <application>psql</>. To continue a command across multiple lines, you must type backslash just before each newline except the last one. </para> <para> But if you use the <option>-N</> command line switch, then newline does not terminate command entry. In this case, the server will read the standard input until the end-of-file (<acronym>EOF</>) marker, then process the input as a single command string. Backslash-newline is not treated specially in this case. </para> <para> To quit the session, type <acronym>EOF</acronym> (<keycombo action="simul"><keycap>Control</><keycap>D</></>, usually). If you've used <option>-N</>, two consecutive <acronym>EOF</>s are needed to exit. </para> <para> Note that the stand-alone server does not provide sophisticated line-editing features (no command history, for example). </para> </refsect1> <refsect1> <title>See Also</title> <para> <xref linkend="app-initdb">, <xref linkend="app-ipcclean">, <xref linkend="app-postmaster"> </para> </refsect1></refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:nilsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tsgml-parent-document:nilsgml-default-dtd-file:"../reference.ced"sgml-exposed-tags:nilsgml-local-catalogs:"/usr/lib/sgml/catalog"sgml-local-ecat-files:nilEnd:-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -