public inbox for [email protected]  
help / color / mirror / Atom feed
From: Xuneng Zhou <[email protected]>
To: Michael Paquier <[email protected]>
Cc: Alexander Lakhin <[email protected]>
Cc: [email protected]
Subject: Re: BUG #18158: Assert in pgstat_report_stat() fails when a backend shutting down with stats pending
Date: Mon, 8 Jun 2026 16:43:31 +0800
Message-ID: <CABPTF7Vg1CTf49c4gvYu-6-0h7LNSqgWe5_+63FcmTgeqseK1w@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<CABPTF7XdDoLAoLKo7pOHmSqHniHf46Pw8Z=iqNx2uYi4J5ixBA@mail.gmail.com>
	<[email protected]>
	<CABPTF7VgzdBP_ZPKf2eZ79ry0fVKzcgCkB5gy60HGXCy0EQb0w@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CABPTF7XWsFgfAqqTv2epcMQs+vT6EMg_j43F8CSJ7Cjsv8QLJQ@mail.gmail.com>
	<[email protected]>

On Mon, Jun 8, 2026 at 1:49 PM Michael Paquier <[email protected]> wrote:
>
> On Sat, Jun 06, 2026 at 08:45:26PM +0800, Xuneng Zhou wrote:
> > Sorry for being late. One nit for the patch -- would it be better to
> > use AmWalSenderProcess() for identification to save the include?
> > +#include "replication/walsender.h"
>
> In the startup sequence, MyBackendType is updated to B_WAL_SENDER a
> couple of lines after am_walsender.  One or the other don't really
> matter; they're both right.

Yeah, both of them work well.  To use AmWalSenderProcess(), we would
need to include src/include/miscadmin.h, whereas using am_walsender
requires including “replication/walsender.h”. I’m just wondering
whether using AmWalSenderProcess() would result in less coupling
between pgstat and replication.


--
Regards,
Xuneng Zhou
HighGo Software Co., Ltd.






view thread (12+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: BUG #18158: Assert in pgstat_report_stat() fails when a backend shutting down with stats pending
  In-Reply-To: <CABPTF7Vg1CTf49c4gvYu-6-0h7LNSqgWe5_+63FcmTgeqseK1w@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox