mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +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:
@ -10,7 +10,7 @@
|
||||
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.563 2010/07/20 00:34:44 rhaas Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.564 2010/07/20 00:47:53 rhaas Exp $
|
||||
*
|
||||
*--------------------------------------------------------------------
|
||||
*/
|
||||
@ -550,6 +550,8 @@ const char *const config_group_names[] =
|
||||
gettext_noop("Version and Platform Compatibility / Previous PostgreSQL Versions"),
|
||||
/* COMPAT_OPTIONS_CLIENT */
|
||||
gettext_noop("Version and Platform Compatibility / Other Platforms and Clients"),
|
||||
/* ERROR_HANDLING */
|
||||
gettext_noop("Error Handling"),
|
||||
/* PRESET_OPTIONS */
|
||||
gettext_noop("Preset Options"),
|
||||
/* CUSTOM_OPTIONS */
|
||||
@ -813,16 +815,24 @@ static struct config_bool ConfigureNamesBool[] =
|
||||
#endif
|
||||
assign_debug_assertions, NULL
|
||||
},
|
||||
|
||||
{
|
||||
/* currently undocumented, so don't show in SHOW ALL */
|
||||
{"exit_on_error", PGC_USERSET, UNGROUPED,
|
||||
gettext_noop("No description available."),
|
||||
NULL,
|
||||
GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
|
||||
{"exit_on_error", PGC_USERSET, ERROR_HANDLING_OPTIONS,
|
||||
gettext_noop("Terminate session on any error."),
|
||||
NULL
|
||||
},
|
||||
&ExitOnAnyError,
|
||||
false, NULL, NULL
|
||||
},
|
||||
{
|
||||
{"restart_after_crash", PGC_SIGHUP, ERROR_HANDLING_OPTIONS,
|
||||
gettext_noop("Reinitialize after backend crash."),
|
||||
NULL
|
||||
},
|
||||
&restart_after_crash,
|
||||
true, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"log_duration", PGC_SUSET, LOGGING_WHAT,
|
||||
gettext_noop("Logs the duration of each completed SQL statement."),
|
||||
|
Reference in New Issue
Block a user