Re: Add 'worker_type' to pg_stat_subscription

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Add 'worker_type' to pg_stat_subscription
Дата
Msg-id CAA4eK1+CwqnffXihcdZCXzuahog+taZ=y=d1GeUV3NRE4o=Lbg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add 'worker_type' to pg_stat_subscription  (Peter Smith <smithpb2250@gmail.com>)
Список pgsql-hackers
On Mon, Sep 18, 2023 at 6:10 AM Peter Smith <smithpb2250@gmail.com> wrote:
>
> IIUC some future feature syncing of sequences is likely to share a lot
> of the tablesync worker code (maybe it is only differentiated by the
> relid being for a RELKIND_SEQUENCE?).
>
> The original intent of this stats worker-type patch was to be able to
> easily know the type of the process without having to dig through
> other attributes (like relid etc.) to infer it.
>

That makes sense and I think it will probably be helpful in debugging.
For example, I am not sure the following and similar changes in the
patch are a good idea:
if (am_tablesync_worker())
  ereport(LOG,
- (errmsg("logical replication table synchronization worker for
subscription \"%s\", table \"%s\" has started",
+ (errmsg("logical replication synchronization worker for subscription
\"%s\", table \"%s\" has started",

I think it would be sometimes helpful in debugging to know the type of
sync worker, so keeping the type in the above message would be
helpful.

> If you feel
> differentiating kinds of syncing processes won't be of interest to
> users then just generically calling it "synchronization" is fine by
> me. OTOH, if users might care what 'kind' of syncing it is, perhaps
> leaving the stats attribute as "table synchronization" (and some
> future patch would add "sequence synchronization") is better.
>

Earlier, I thought it would be better to keep it generic but after
seeing your point and the latest changes in the patch it seems
differentiating between types of sync workers would be a good idea.

--
With Regards,
Amit Kapila.



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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: make add_paths_to_append_rel aware of startup cost
Следующее
От: David Rowley
Дата:
Сообщение: Re: Speed up transaction completion faster after many relations are accessed in a transaction