Re: Add 'worker_type' to pg_stat_subscription

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Add 'worker_type' to pg_stat_subscription
Дата
Msg-id CAA4eK1KjTs3_=hFaXWmGQih-nZBChXhmHBHMv5cxtqFFMQNkkA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add 'worker_type' to pg_stat_subscription  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: Add 'worker_type' to pg_stat_subscription  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
On Mon, Sep 18, 2023 at 8:50 PM Nathan Bossart <nathandbossart@gmail.com> wrote:
>
> On Mon, Sep 18, 2023 at 04:56:46PM +1000, Peter Smith wrote:
> > On Mon, Sep 18, 2023 at 1:43 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
> >> 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".
>
> From the latest discussion, it sounds like you (Peter and Amit) are leaning
> more towards something like the v7 patch [0].
>

I am of the opinion that worker_type should be 'apply' instead of
'leader apply' because even when it is a leader for parallel apply
worker, it could perform individual transactions apply. For reference,
I checked pg_stat_activity.backend_type, there is nothing called main
or leader backend even when the backend is involved in parallel query.

--
With Regards,
Amit Kapila.



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

Предыдущее
От: "Hayato Kuroda (Fujitsu)"
Дата:
Сообщение: RE: pg_ctl start may return 0 even if the postmaster has been already started on Windows
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Bug fix for psql's meta-command \ev