Обсуждение: [patch] Add process title to test_shm_mq worker

Поиск
Список
Период
Сортировка

[patch] Add process title to test_shm_mq worker

От
Michael Banck
Дата:
Hi,

albeit just a test module, the test_shm_mq test can run a few seconds,
and during that, it looks like this:

mbanck     2701  - Rsfo  0:00.51 postgres:

With the attached patch, it looks like this:

mbanck     2780  - Rsfo  0:01.63 postgres: test_shm_mq worker

I think the process title got lost in 5373bc2a where bgw_name was
replaced with bgw_type. Maybe that was intentional, but the
corresponding change to src/test/modules/worker_spi was made so that
bgw_name was preserved/changed.


Michael

Вложения

Re: [patch] Add process title to test_shm_mq worker

От
Nathan Bossart
Дата:
On Mon, Feb 02, 2026 at 06:31:56PM +0100, Michael Banck wrote:
> albeit just a test module, the test_shm_mq test can run a few seconds,
> and during that, it looks like this:
> 
> mbanck     2701  - Rsfo  0:00.51 postgres:
> 
> With the attached patch, it looks like this:
> 
> mbanck     2780  - Rsfo  0:01.63 postgres: test_shm_mq worker
> 
> I think the process title got lost in 5373bc2a where bgw_name was
> replaced with bgw_type. Maybe that was intentional, but the
> corresponding change to src/test/modules/worker_spi was made so that
> bgw_name was preserved/changed.

Seems reasonable to me.  While it's only a test module, folks might use it
as a starting point for their own module, so IMHO it's worth setting a good
example.  I'll wait for a couple, but otherwise I'll go commit this soon.

-- 
nathan



Re: [patch] Add process title to test_shm_mq worker

От
Nathan Bossart
Дата:
On Mon, Feb 02, 2026 at 11:38:51AM -0600, Nathan Bossart wrote:
> Seems reasonable to me.  While it's only a test module, folks might use it
> as a starting point for their own module, so IMHO it's worth setting a good
> example.  I'll wait for a couple, but otherwise I'll go commit this soon.

Committed.  I ended up moving the new line to the background worker
registration loop so that we can add the worker number to the name, too.

-- 
nathan



Re: [patch] Add process title to test_shm_mq worker

От
Michael Banck
Дата:
Hi,

On Mon, Feb 02, 2026 at 03:46:35PM -0600, Nathan Bossart wrote:
> On Mon, Feb 02, 2026 at 11:38:51AM -0600, Nathan Bossart wrote:
> > Seems reasonable to me.  While it's only a test module, folks might use it
> > as a starting point for their own module, so IMHO it's worth setting a good
> > example.  I'll wait for a couple, but otherwise I'll go commit this soon.
>
> Committed.

Thanks!

> I ended up moving the new line to the background worker registration
> loop so that we can add the worker number to the name, too.

Oh right, I missed that one.


Michael