From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
---|---|
To: | bt22nakamorit <bt22nakamorit(at)oss(dot)nttdata(dot)com> |
Cc: | Fujii Masao <masao(dot)fujii(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-10 03:27:31 |
Message-ID: | CALj2ACVTA01c1bncoXD+kTNo2f-B7b9oXznObB+qwasB0KssWA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Oct 10, 2022 at 8:00 AM bt22nakamorit
<bt22nakamorit(at)oss(dot)nttdata(dot)com> wrote:
>
> appendStringInfo will append extra space after null (since "%s "), so
> the ps entry will look less neat in that case.
> How about we check whether port->database_name is null or not, instead
> of making it unconditional?
> It will look like this.
> - if (!am_walsender)
> + if (port->database_name != NULL)
> appendStringInfo(&ps_data, "%s ", port->database_name);
if (port->database_name != NULL && port->database_name[0] != '\0')
appendStringInfo(&ps_data, "%s ", port->database_name);
The above works better.
--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2022-10-10 04:27:22 | Re: create subscription - improved warning message |
Previous Message | Bharath Rupireddy | 2022-10-10 03:23:55 | Remove an unnecessary LSN calculation while validating WAL page header |