</listitem>
</varlistentry>
+ <varlistentry id="guc-log-pcp-processes" xreflabel="log_pcp_processes">
+ <term><varname>log_pcp_processes</varname> (<type>boolean</type>)
+ <indexterm>
+ <!--
+ <primary><varname>log_pcp_processes</varname> configuration parameter</primary>
+ -->
+ <primary><varname>log_pcp_processes</varname> 設定パラメータ</primary>
+ </indexterm>
+ </term>
+ <listitem>
+ <para>
+ <!--
+ Setting to on, enable logging about normal PCP Process
+ fork and exit statues. Default is on.
+ -->
+ onに設定されている場合、PCPプロセスの正常なforkあるいはexitした状態をログに出力します。
+ デフォルトはonです。
+ </para>
+ <para>
+ <!--
+ This parameter can be changed by reloading the <productname>Pgpool-II</> configurations.
+ -->
+ このパラメータは<productname>Pgpool-II</>の設定を再読み込みすることで変更可能です。
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="guc-log-error-verbosity" xreflabel="log_error_verbosity">
<term><varname>log_error_verbosity</varname> (<type>enum</type>)
<indexterm>
</listitem>
</varlistentry>
+ <varlistentry id="guc-log-pcp-processes" xreflabel="log_pcp_processes">
+ <term><varname>log_pcp_processes</varname> (<type>boolean</type>)
+ <indexterm>
+ <primary><varname>log_pcp_processes</varname> configuration parameter</primary>
+ </indexterm>
+ </term>
+ <listitem>
+ <para>
+ Setting to on, enable logging about normal PCP Process
+ fork and exit statues. Default is on.
+ </para>
+ <para>
+ This parameter can be changed by reloading the <productname>Pgpool-II</> configurations.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="guc-log-error-verbosity" xreflabel="log_error_verbosity">
<term><varname>log_error_verbosity</varname> (<type>enum</type>)
<indexterm>
NULL, NULL, NULL
},
+ {
+ {"log_pcp_processes", CFGCXT_RELOAD, LOGGING_CONFIG,
+ "Logs PCP process forks and anormal exit status to the log",
+ CONFIG_VAR_TYPE_BOOL, false, 0
+ },
+ &g_pool_config.log_pcp_processes,
+ true,
+ NULL, NULL, NULL
+ },
+
{
{"log_hostname", CFGCXT_RELOAD, LOGGING_CONFIG,
"Logs the host name in the connection logs.",
bool replication_mode; /* replication mode */
bool log_connections; /* logs incoming connections */
bool log_disconnections; /* logs closing connections */
+ bool log_pcp_processes; /* logs pcp processes */
bool log_hostname; /* resolve hostname */
bool enable_pool_hba; /* enables pool_hba.conf file
* authentication */
}
else /* parent */
{
- ereport(LOG,
- (errmsg("forked new pcp worker, pid=%d socket=%d",
- (int) pid, (int) port)));
+ if (pool_config->log_pcp_processes)
+ ereport(LOG,
+ (errmsg("forked new pcp worker, pid=%d socket=%d",
+ (int) pid, (int) port)));
/* close the port in parent process. It is only consumed by child */
close(port);
/* Add it to the list */
if (WEXITSTATUS(status) == POOL_EXIT_FATAL)
ereport(LOG,
(errmsg("PCP worker process with pid: %d exit with FATAL ERROR.", pid)));
- else
+ else if (pool_config->log_pcp_processes)
ereport(LOG,
(errmsg("PCP process with pid: %d exit with SUCCESS.", pid)));
}
if (WTERMSIG(status) == SIGSEGV)
ereport(WARNING,
(errmsg("PCP process with pid: %d was terminated by segmentation fault", pid)));
- else
+ else if (pool_config->log_pcp_processes)
ereport(LOG,
(errmsg("PCP process with pid: %d exits with status %d by signal %d", pid, status, WTERMSIG(status))));
}
- else
+ else if (pool_config->log_pcp_processes || status != 0)
ereport(LOG,
(errmsg("PCP process with pid: %d exits with status %d", pid, status)));
+
ereport(DEBUG2,
(errmsg("going to remove pid: %d from pid list having %d elements", pid, list_length(pcp_worker_children))));
/* remove the pid of process from the list */
# Log connections
#log_disconnections = off
# Log disconnections
+#log_pcp_processes = on
+ # Log PCP Processes
#log_hostname = off
# Hostname will be shown in ps status
# and in logs if connections are logged
StrNCpy(status[i].desc, "if true, print closing connections to the log", POOLCONFIG_MAXDESCLEN);
i++;
+ StrNCpy(status[i].name, "log_pcp_processes", POOLCONFIG_MAXNAMELEN);
+ snprintf(status[i].value, POOLCONFIG_MAXVALLEN, "%d", pool_config->log_pcp_processes);
+ StrNCpy(status[i].desc, "if true, print PCP process forks and anormal exit status to the log", POOLCONFIG_MAXDESCLEN);
+ i++;
+
StrNCpy(status[i].name, "log_hostname", POOLCONFIG_MAXNAMELEN);
snprintf(status[i].value, POOLCONFIG_MAXVALLEN, "%d", pool_config->log_hostname);
StrNCpy(status[i].desc, "if true, resolve hostname for ps and log print", POOLCONFIG_MAXDESCLEN);