Re: Add 'worker_type' to pg_stat_subscription

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Maxim Orlov <orlovmg(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add 'worker_type' to pg_stat_subscription
Date: 2023-09-13 16:59:04
Message-ID: 20230913165904.GA815668@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 13, 2023 at 05:06:28PM +0300, Maxim Orlov wrote:
> I did a look at the patch, like the idea. The overall code is in a good
> condition, implements the described feature.

Thanks for reviewing.

> Side note: this is not a problem of this particular patch, but in
> pg_stat_get_subscription and many other places, there
> is a switch with worker types. Can we use a default section there to have
> an explicit error instead of the compiler
> warnings if somehow we decide to add another one worker type?

-1. We want such compiler warnings to remind us to adjust the code
accordingly. If we just rely on an ERROR in the default section, we might
miss it if there isn't a relevant test.

> So, should we mark this thread as RfC?

I've done so. Barring additional feedback, I intend to commit this in the
next few days.

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Sabino Mullane 2023-09-13 17:10:16 Re: Possibility to disable `ALTER SYSTEM`
Previous Message Jeff Davis 2023-09-13 15:14:11 Re: Avoid a possible null pointer (src/backend/utils/adt/pg_locale.c)