From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
Cc: | 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-09 09:30:49 |
Message-ID: | CALj2ACWVucn+qXuH3g0yPS0cHitpGsBEztJ222dVPAy2dpZLQw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Oct 7, 2022 at 7:25 PM Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote:
>
> Thanks for updating the patch! LGTM.
- if (!am_walsender)
+ if (!am_walsender || am_db_walsender)
appendStringInfo(&ps_data, "%s ", port->database_name);
Can the appendStringInfo be just unconditional? That is more readable
IMO. We want the database_name to be appended whenever it isn't null.
The only case we expect database_name to be null is for walsenders
serving streaming replication standbys and even when database_name is
null, nothing gets appended, it's just the appendStringInfo() call
gets wasted, but that's okay.
--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-10-09 19:51:57 | Simplifying our Trap/Assert infrastructure |
Previous Message | Anton A. Melnikov | 2022-10-09 09:24:23 | Re: [BUG] Logical replica crash if there was an error in a function. |