Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit af20515

Browse filesBrowse 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/36a3b137e82e0ea9fe7e4234f03b64a1@oss.nttdata.com
1 parent a54b658 commit af20515
Copy full SHA for af20515

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/backend/postmaster/postmaster.c

Copy file name to clipboardExpand all lines: src/backend/postmaster/postmaster.c
+1-1Lines changed: 1 addition & 1 deletion
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.