Re: Gripes about walsender command processing - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Gripes about walsender command processing
Date
Msg-id 20200915032215.GM2183@paquier.xyz
Whole thread Raw
In response to Re: Gripes about walsender command processing  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Gripes about walsender command processing  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Sep 14, 2020 at 12:51:39PM -0400, Tom Lane wrote:
> I looked into the other point about ps status always claiming the
> walsender is "idle".  This turns out to be something PostgresMain
> does automatically, so unless we want to uglify that logic, we have
> to make walsenders set the field honestly.  So I propose the attached.
> (Is there a better way to get the name of a replication command?
> I didn't look very hard for one.)

Wouldn't that just be in cmdtaglist.h, but extended for nodes used for
replication commands?  Then you could just call CreateCommandTag() to
get the command string to print as postgres.c does.  There is already
one for repslot drop, in some way.  This would have the advantage to
just call once set_ps_display() before the switch split.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Avoid useless retrieval of defaults and check constraints in pg_dump -a
Next
From: Tom Lane
Date:
Subject: Re: Fix for parallel BTree initialization bug