Re: Add 'worker_type' to pg_stat_subscription

Поиск
Список
Период
Сортировка
От Peter Smith
Тема Re: Add 'worker_type' to pg_stat_subscription
Дата
Msg-id CAHut+Pv79c3a7NXje6ZbNGHo_Vu5nNX8bW2A_9qs745G_VQU5g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add 'worker_type' to pg_stat_subscription  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: Add 'worker_type' to pg_stat_subscription  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
On Mon, Sep 18, 2023 at 1:43 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Sun, Sep 17, 2023 at 2:10 AM Nathan Bossart <nathandbossart@gmail.com> wrote:
> >
> > On Sat, Sep 16, 2023 at 06:09:48PM +0530, Amit Kapila wrote:
> >
> > This still leaves the possibility for confusion with the documentation's
> > use of "leader apply worker", but I haven't touched that for now.
> >
>
> We may want to fix that separately but as you have raised here, I
> found the following two places in docs which could be a bit confusing.
>
> "Specifies maximum number of logical replication workers. This
> includes leader apply workers, parallel apply workers, and table
> synchronization"
>
> ""OID of the relation that the worker is synchronizing; NULL for the
> leader apply worker and parallel apply workers"
>
> One simple idea to reduce confusion could be to use (leader) in the
> above two places. Do you see any other place which could be confusing
> and what do you suggest to fix it?
>

IIRC we first encountered this problem with the parallel apply workers
were introduced -- "leader" was added wherever we needed to
distinguish the main apply and the parallel apply worker. Perhaps at
that time, we ought to have changed it *everywhere* instead of
changing only the ambiguous places. Lately, I've been thinking it
would have been easier to have *one* rule and always call the (main)
apply worker the "leader apply" worker -- simply because  2 names
("leader apply" and "parallel apply") are easier to explain than 3
names.

A "leader apply" worker with no "parallel apply" workers is a bit like
the "boss" of a company that has no employees -- IMO it's OK to still
say that they are the "boss".

Regardless, I think changing this in other docs and other code is
outside the scope of this simple pg stats patch -- here we can just
change the relevant config docs and the stats attribute value to
"leader apply" and leave it at that.

Changing every other place to consistently say "leader apply"  is a
bigger task for another thread because we will find lots more places
to change. For example, there are messages like: "logical replication
apply worker for subscription \"%s\" has started" that perhaps should
say "logical replication leader apply worker for subscription \"%s\"
has started". Such changes don't belong in this stats patch.

------
Kind Regards,
Peter Smith.
Fujitsu Australia



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ian Lawrence Barwick
Дата:
Сообщение: Re: pg_stat_get_backend_subxact() and backend IDs?
Следующее
От: "Zhijie Hou (Fujitsu)"
Дата:
Сообщение: RE: [PoC] pg_upgrade: allow to upgrade publisher node