[pgpool-hackers: 3575] Re: application_name for Pgpool-II internal process

Tatsuo Ishii ishii at sraoss.co.jp
Tue Apr 7 14:22:25 JST 2020


>> Hi Pgpool-II developers,
>> 
>> Currently it's not easy to distinguish each line in Pgpool-II log by
>> it's kind: main process, child process (assigned for each session),
>> health check process, replication delay check worker process, pcp main
>> process and pcp child process. I mean, it's hard to tell particular
>> log line belogs to which process kind.
>> 
>> To improve this situation, I propose to assign fixed string to each
>> process kind so that it can be used as a process kind marker using
>> "%a" log line prefix option for "application name".
>> 
>> Here is an initial idea for the application names assigned to each
>> process kind:
>> 
>> Pgpool-II main process: "main"
>> Pgpool-II child process: "child" (should be replaced if application
>> 	  		 name is specified in a start up packet)
>> health check process: "health_check%d" (%d is replaced with node id)
>> replication delay check worker process: "delay_check_worker"
>> PCP main process: "pcp_main"
>> PCP child process: "pcp_child"
>> 
>> What do you think?
> 
> I have implemented initial version of this. Below is pgpool log with
> log_min_messages = debug1
> and
> log_line_prefix = '%t: %a: pid %p: '
> (watchdog is enabled).
> 
> I gave application names to watchdog related process as well.
> 
> Patch attached.

Applied with documentation updates.

Also allow to set application name parameter of log_line_prefix in
more cases.  %a in log_line_prefix was only be set if application_name
is specified in startup message. Now it is possible to set
application_name if it is set in the connection parameter or SET
command.
This in the TODO: https://pgpool.net/mediawiki/index.php/TODO#Allow_to_set_application_name_in_log_line_prefix

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list