forked from agroal/pgagroal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[agroal#285] Introduce
update_process_title
setting
This commit adds the `update_process_title` configuration setting. Values for such setting are: - `never` or `off`, means the user does not want to update the process title at all; - `strict` (used on Linux and systems that do no provide a native call to update the process title) allows for changing the process title without overflowing the length of the initial command line; - `minimal` sets the process title to `user/database` even if this exceeds the initial command line length; - `verbose` sets the process title to `user@host:port/database` even if this overflows the initial command line length. By default the setting is configured as `verbose`, but this could break some aggressively secured environments, where no native way to set the process title is provided. The `pgagroal_set_proc_title` function has been refactored so that, if the update policy is set to `never` the process title will never be updated. This can be confusing because even the "main" process will not have a title update. Likely, if the policy is `strict`, the function will never try to overflow the initial command line length. When set to `verbose` or leaved as default, the process title is built with information about the hostname, port, username and database. This can produce a very long title, that is in any case cut at `MAX_PROCESS_TITLE_LENGTH` (256 bytes, including the terminator). In the unluckily case the primary server cannot be determined, the `verbose` mode is set back to `minimal`, but this indicates there is something wrong somewhere else. On those systems that do provide a native way to set the process title, there is no difference between `strict` and `minimal` and the `minmal` policy is always adopted. Documentation updated. Close agroal#285
- Loading branch information
Showing
6 changed files
with
137 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters