1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

Add restart_after_crash GUC.

Normally, we automatically restart after a backend crash, but in some
cases when PostgreSQL is invoked by clusterware it may be desirable to
suppress this behavior, so we provide an option which does this.
Since no existing GUC group quite fits, create a new group called
"error handling options" for this and the previously undocumented GUC
exit_on_error, which is now documented.

Review by Fujii Masao.
This commit is contained in:
Robert Haas
2010-07-20 00:47:53 +00:00
parent 0839f312e9
commit 5ffaa9005c
7 changed files with 79 additions and 16 deletions

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.297 2010/07/20 00:34:44 rhaas Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.298 2010/07/20 00:47:52 rhaas Exp $ -->
<chapter Id="runtime-config">
<title>Server Configuration</title>
@ -5330,6 +5330,47 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
</sect2>
</sect1>
<sect1 id="runtime-config-error-handling">
<title>Error Handling</title>
<variablelist>
<varlistentry id="guc-exit-on-error" xreflabel="exit_on_error">
<term><varname>exit_on_error</varname> (<type>boolean</type>)</term>
<indexterm>
<primary><varname>exit_on_error</> configuration parameter</primary>
</indexterm>
<listitem>
<para>
If true, any error will terminate the current session. By default,
this is set to false, so that only FATAL errors will terminate the
session.
</para>
</listitem>
</varlistentry>
<varlistentry id="guc-restart-after-crash" xreflabel="restart_after_crash">
<term><varname>restart_after_crash</varname> (<type>boolean</type>)</term>
<indexterm>
<primary><varname>restart_after_crash</> configuration parameter</primary>
</indexterm>
<listitem>
<para>
When set to true, which is the default, <productname>PostgreSQL</>
will automatically reinitialize after a backend crash. Leaving this
value set to true is normally the best way to maximize the availability
of the database. However, in some circumstances, such as when
<productname>PostgreSQL</> is being invoked by clusterware, it may be
useful to disable this behavior, so that the clusterware can gain
control and take any actions it deems appropriate.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect1>
<sect1 id="runtime-config-preset">
<title>Preset Options</title>