Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
- index ea16c64..d4bfb5c 100644
- --- a/src/backend/utils/misc/guc.c
- +++ b/src/backend/utils/misc/guc.c
- @@ -1046,6 +1046,16 @@ static struct config_bool ConfigureNamesBool[] =
- },
- {
- + {"application_in_process_title", PGC_SUSET, STATS_COLLECTOR,
- + gettext_noop("Display the application name in the process title."),
- + gettext_noop("Enables updating of the process title with the application name if it is defined in the current connection.")
- + },
- + &application_in_process_title,
- + true,
- + NULL, NULL, NULL
- + },
- +
- + {
- {"autovacuum", PGC_SIGHUP, AUTOVACUUM,
- gettext_noop("Starts the autovacuum subprocess."),
- NULL
- diff --git a/src/backend/utils/misc/ps_status.c b/src/backend/utils/misc/ps_status.c
- index 4baacad..262edd9 100644
- --- a/src/backend/utils/misc/ps_status.c
- +++ b/src/backend/utils/misc/ps_status.c
- @@ -33,7 +33,7 @@
- extern char **environ;
- bool update_process_title = true;
- -
- +bool application_in_process_title = false;
- /*
- * Alternative ways of updating ps display:
- @@ -307,7 +307,7 @@ set_ps_display(const char *activity, bool force)
- #endif
- ps_buffer_dynamic_len = 0;
- - if (application_name)
- + if (application_name && application_in_process_title)
- {
- strlcpy(ps_buffer + ps_buffer_fixed_size, application_name,
- ps_buffer_size - ps_buffer_fixed_size);
- diff --git a/src/include/utils/ps_status.h b/src/include/utils/ps_status.h
- index 3f503cc..7521242 100644
- --- a/src/include/utils/ps_status.h
- +++ b/src/include/utils/ps_status.h
- @@ -14,6 +14,8 @@
- extern bool update_process_title;
- +extern bool application_in_process_title;
- +
- extern char **save_ps_display_args(int argc, char **argv);
- extern void init_ps_display(const char *username, const char *dbname,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement