mirror of
https://github.com/postgres/postgres.git
synced 2025-11-22 12:22:45 +03:00
Remove trace_recovery_messages
This GUC was intended as a debugging help in the 9.0 area when hot standby and streaming replication were being developped, able to offer more information at LOG level rather than DEBUGn. There are more tools available these days that are able to offer rather equivalent information, like pg_waldump introduced in 9.3. It is not obvious how this facility is useful these days, so let's remove it. Author: Bharath Rupireddy Discussion: https://postgr.es/m/ZXEXEAUVFrvpquSd@paquier.xyz
This commit is contained in:
5
src/backend/utils/cache/inval.c
vendored
5
src/backend/utils/cache/inval.c
vendored
@@ -966,13 +966,12 @@ ProcessCommittedInvalidationMessages(SharedInvalidationMessage *msgs,
|
||||
if (nmsgs <= 0)
|
||||
return;
|
||||
|
||||
elog(trace_recovery(DEBUG4), "replaying commit with %d messages%s", nmsgs,
|
||||
elog(DEBUG4, "replaying commit with %d messages%s", nmsgs,
|
||||
(RelcacheInitFileInval ? " and relcache file invalidation" : ""));
|
||||
|
||||
if (RelcacheInitFileInval)
|
||||
{
|
||||
elog(trace_recovery(DEBUG4), "removing relcache init files for database %u",
|
||||
dbid);
|
||||
elog(DEBUG4, "removing relcache init files for database %u", dbid);
|
||||
|
||||
/*
|
||||
* RelationCacheInitFilePreInvalidate, when the invalidation message
|
||||
|
||||
@@ -3759,29 +3759,3 @@ write_stderr_signal_safe(const char *str)
|
||||
nwritten += rc;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Adjust the level of a recovery-related message per trace_recovery_messages.
|
||||
*
|
||||
* The argument is the default log level of the message, eg, DEBUG2. (This
|
||||
* should only be applied to DEBUGn log messages, otherwise it's a no-op.)
|
||||
* If the level is >= trace_recovery_messages, we return LOG, causing the
|
||||
* message to be logged unconditionally (for most settings of
|
||||
* log_min_messages). Otherwise, we return the argument unchanged.
|
||||
* The message will then be shown based on the setting of log_min_messages.
|
||||
*
|
||||
* Intention is to keep this for at least the whole of the 9.0 production
|
||||
* release, so we can more easily diagnose production problems in the field.
|
||||
* It should go away eventually, though, because it's an ugly and
|
||||
* hard-to-explain kluge.
|
||||
*/
|
||||
int
|
||||
trace_recovery(int trace_level)
|
||||
{
|
||||
if (trace_level < LOG &&
|
||||
trace_level >= trace_recovery_messages)
|
||||
return LOG;
|
||||
|
||||
return trace_level;
|
||||
}
|
||||
|
||||
@@ -525,7 +525,6 @@ int log_parameter_max_length_on_error = 0;
|
||||
int log_temp_files = -1;
|
||||
double log_statement_sample_rate = 1.0;
|
||||
double log_xact_sample_rate = 0;
|
||||
int trace_recovery_messages = LOG;
|
||||
char *backtrace_functions;
|
||||
|
||||
int temp_file_limit = -1;
|
||||
@@ -4780,23 +4779,6 @@ struct config_enum ConfigureNamesEnum[] =
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"trace_recovery_messages", PGC_SIGHUP, DEVELOPER_OPTIONS,
|
||||
gettext_noop("Enables logging of recovery-related debugging information."),
|
||||
gettext_noop("Each level includes all the levels that follow it. The later"
|
||||
" the level, the fewer messages are sent."),
|
||||
GUC_NOT_IN_SAMPLE,
|
||||
},
|
||||
&trace_recovery_messages,
|
||||
|
||||
/*
|
||||
* client_message_level_options allows too many values, really, but
|
||||
* it's not worth having a separate options array for this.
|
||||
*/
|
||||
LOG, client_message_level_options,
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"track_functions", PGC_SUSET, STATS_CUMULATIVE,
|
||||
gettext_noop("Collects function-level statistics on database activity."),
|
||||
|
||||
Reference in New Issue
Block a user