yugabyte/yugabyte-db

[YSQL] Make postgres backend startup logs concise and useful

Open

#31833 opened on May 21, 2026

View on GitHub
 (2 comments) (0 reactions) (1 assignee)C (8,229 stars) (1,003 forks)batch import
area/ysqlgood first issuekind/enhancementpriority/low

Description

Jira Link: DB-21532

Description

Whenever a new backend starts up, we get the following log messages at default log level:

I0521 13:08:58.093974 4282175680 postmaster.c:5044] Started regular backend with pid: 59881, user_name: yugabyte, remote_ps_data: 127.0.0.1(62342)
I0521 13:08:58.097683 4282175680 pggate.cc:526] Using TServer host_port: 127.0.0.1:9100
W0521 13:08:58.099365 4282175680 hybrid_clock.cc:149] HybridClock initialized in local mode (OS X only). Not suitable for distributed clusters.
I0521 13:08:58.101590 4282175680 pg_client.cc:708] Session id 9: Session id acquired. Postgres backend pid: 59881

These messages come from a mix of postgres and pggate logs. The following message is redundant and can be removed:

  • Using TServer host_port: 127.0.0.1:9100: This is a constant for all backends in the node. It doesn't really add new information.

The following message can be enhanced with additional information:

  • Started regular backend with pid: 59881, user_name: yugabyte, remote_ps_data: 127.0.0.1(62342)

Specifically, the following items can be added to it:

  • Name of the database that we are connected to.
  • Name of the application as set by the user/client
  • The backend type
  • If the process is a parallel query worker, then the process ID of the parallel group leader

The following serves as a good source of documentation for this change: https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-LOG-LINE-PREFIX

Issue Type

kind/enhancement

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.

Contributor guide