mirror of
https://github.com/postgres/postgres.git
synced 2025-07-11 10:01:57 +03:00
Add support for tracking call counts and elapsed runtime for user-defined
functions. Note that because this patch changes FmgrInfo, any external C functions you might be testing with 8.4 will need to be recompiled. Patch by Martin Pihlak, some editorialization by me (principally, removing tracking of getrusage() numbers)
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.453 2008/05/12 08:35:05 mha Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.454 2008/05/15 00:17:40 tgl Exp $
|
||||
*
|
||||
*--------------------------------------------------------------------
|
||||
*/
|
||||
@ -169,7 +169,6 @@ static char *config_enum_get_options(struct config_enum *record,
|
||||
const char *prefix, const char *suffix);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Options for enum values defined in this module.
|
||||
*/
|
||||
@ -241,6 +240,13 @@ static const struct config_enum_entry syslog_facility_options[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
static const struct config_enum_entry track_function_options[] = {
|
||||
{"none", TRACK_FUNC_OFF},
|
||||
{"pl", TRACK_FUNC_PL},
|
||||
{"all", TRACK_FUNC_ALL},
|
||||
{NULL, 0}
|
||||
};
|
||||
|
||||
static const struct config_enum_entry xmlbinary_options[] = {
|
||||
{"base64", XMLBINARY_BASE64},
|
||||
{"hex", XMLBINARY_HEX},
|
||||
@ -2524,6 +2530,15 @@ static struct config_enum ConfigureNamesEnum[] =
|
||||
assign_session_replication_role, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"track_functions", PGC_SUSET, STATS_COLLECTOR,
|
||||
gettext_noop("Collects function-level statistics on database activity."),
|
||||
gettext_noop("Valid values are: NONE, PL, and ALL.")
|
||||
},
|
||||
&pgstat_track_functions,
|
||||
TRACK_FUNC_OFF, track_function_options, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"wal_sync_method", PGC_SIGHUP, WAL_SETTINGS,
|
||||
gettext_noop("Selects the method used for forcing WAL updates to disk."),
|
||||
|
Reference in New Issue
Block a user