Skip to content

Commit af20515

Browse files
committed
Add the database name to the ps display of logical WAL senders
Logical WAL senders display now as follows, gaining a database name: postgres: walsender USER DATABASE HOST(PORT) STATE Physical WAL senders show up the same, as of: postgres: walsender USER HOST(PORT) STATE This information was missing, hence it was not possible to know from ps if a WAL sender was a logical or a physical one, and on which database it is connected when it is logical. Author: Tatsuhiro Nakamori Reviewed-by: Fujii Masao, Bharath Rupireddy Discussion: https://postgr.es/m/[email protected]
1 parent a54b658 commit af20515

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/postmaster/postmaster.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -4365,7 +4365,7 @@ BackendInitialize(Port *port)
43654365
if (am_walsender)
43664366
appendStringInfo(&ps_data, "%s ", GetBackendTypeDesc(B_WAL_SENDER));
43674367
appendStringInfo(&ps_data, "%s ", port->user_name);
4368-
if (!am_walsender)
4368+
if (port->database_name[0] != '\0')
43694369
appendStringInfo(&ps_data, "%s ", port->database_name);
43704370
appendStringInfoString(&ps_data, port->remote_host);
43714371
if (port->remote_port[0] != '\0')

0 commit comments

Comments
 (0)