Re: Gripes about walsender command processing

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Gripes about walsender command processing
Date: 2020-09-15 03:22:15
Message-ID: 20200915032215.GM2183@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-09-15 03:24:55 Re: Fix for parallel BTree initialization bug
Previous Message Michael Paquier 2020-09-15 03:08:34 Re: Avoid useless retrieval of defaults and check constraints in pg_dump -a