From: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
---|---|
To: | bt22nakamorit <bt22nakamorit(at)oss(dot)nttdata(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: ps command does not show walsender's connected db |
Date: | 2022-10-07 07:59:48 |
Message-ID: | c10807cf-c51e-5f59-3f8a-0980a7d306fd@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2022/10/06 22:30, bt22nakamorit wrote:
> Hi,
>
> When walsender process is evoked for logical replication, walsender is connected to a database of the subscriber.
> Naturally, ones would want the name of the connected database to show in the entry of ps command for walsender.
> In detail, running ps aux during the logical replication shows results like the following:
> postgres=# \! ps aux | grep postgres;
> ...
> ACTC-I\+ 14575 0.0 0.0 298620 14228 ? Ss 18:22 0:00 postgres: walsender ACTC-I\nakamorit [local] S
>
> However, since walsender is connected to a database of the subscriber in logical replication,
s/subscriber/publisher ?
> it should show the database name, as in the following:
> postgres=# \! ps aux | grep postgres
> ...
> ACTC-I\+ 15627 0.0 0.0 298624 13936 ? Ss 15:45 0:00 postgres: walsender ACTC-I\nakamorit postgres
>
> Showing the database name should not apply in streaming replication though since walsender process is not connected to any specific database.
>
> The attached patch adds the name of the connected database to the ps entry of walsender in logical replication, and not in streaming replication.
>
> Thoughts?
+1
Thanks for the patch!
-
+ printf("fork child process\n");
+ printf(" am_walsender: %d\n", am_walsender);
+ printf(" am_db_walsender: %d\n", am_db_walsender);
The patch seems to include the debug code accidentally.
Except this, the patch looks good to me.
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2022-10-07 08:08:35 | Re: [PoC] Improve dead tuple storage for lazy vacuum |
Previous Message | Amit Langote | 2022-10-07 07:31:16 | Re: ExecRTCheckPerms() and many prunable partitions |