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
signature.asc
Description: PGP signature