Re: Add 'worker_type' to pg_stat_subscription - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: Add 'worker_type' to pg_stat_subscription
Date
Msg-id 20230913165904.GA815668@nathanxps13
Whole thread Raw
In response to Re: Add 'worker_type' to pg_stat_subscription  (Maxim Orlov <orlovmg@gmail.com>)
Responses Re: Add 'worker_type' to pg_stat_subscription
Re: Add 'worker_type' to pg_stat_subscription
List 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



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Avoid a possible null pointer (src/backend/utils/adt/pg_locale.c)
Next
From: Greg Sabino Mullane
Date:
Subject: Re: Possibility to disable `ALTER SYSTEM`