Re: Add 'worker_type' to pg_stat_subscription

Поиск
Список
Период
Сортировка
Искать
От
Nathan Bossart
Тема
Re: Add 'worker_type' to pg_stat_subscription
Дата
Msg-id
20230901194154.GA3182997@nathanxps13
Ответ на
Список
Дерево обсуждения
Add 'worker_type' to pg_stat_subscription Peter Smith <smithpb2250@gmail.com>
Re: Add 'worker_type' to pg_stat_subscription Nathan Bossart <nathandbossart@gmail.com>
Re: Add 'worker_type' to pg_stat_subscription Peter Smith <smithpb2250@gmail.com>
Re: Add 'worker_type' to pg_stat_subscription Nathan Bossart <nathandbossart@gmail.com>
Re: Add 'worker_type' to pg_stat_subscription Peter Smith <smithpb2250@gmail.com>
Re: Add 'worker_type' to pg_stat_subscription Nathan Bossart <nathandbossart@gmail.com>
Re: Add 'worker_type' to pg_stat_subscription Peter Smith <smithpb2250@gmail.com>
Re: Add 'worker_type' to pg_stat_subscription Michael Paquier <michael@paquier.xyz>
Re: Add 'worker_type' to pg_stat_subscription Peter Smith <smithpb2250@gmail.com>
Re: Add 'worker_type' to pg_stat_subscription Michael Paquier <michael@paquier.xyz>
Re: Add 'worker_type' to pg_stat_subscription Maxim Orlov <orlovmg@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>
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>
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>
Re: Add 'worker_type' to pg_stat_subscription Amit Kapila <amit.kapila16@gmail.com>
Re: Add 'worker_type' to pg_stat_subscription Peter Smith <smithpb2250@gmail.com>
Re: Add 'worker_type' to pg_stat_subscription Nathan Bossart <nathandbossart@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>
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>
Re: Add 'worker_type' to pg_stat_subscription Peter Smith <smithpb2250@gmail.com>
Re: Add 'worker_type' to pg_stat_subscription Peter Smith <smithpb2250@gmail.com>
Re: Add 'worker_type' to pg_stat_subscription Michael Paquier <michael@paquier.xyz>
Re: Add 'worker_type' to pg_stat_subscription Nathan Bossart <nathandbossart@gmail.com>
Re: Add 'worker_type' to pg_stat_subscription Peter Smith <smithpb2250@gmail.com>
Re: Add 'worker_type' to pg_stat_subscription Amit Kapila <amit.kapila16@gmail.com>
Re: Add 'worker_type' to pg_stat_subscription Peter Smith <smithpb2250@gmail.com>
Re: Add 'worker_type' to pg_stat_subscription Peter Smith <smithpb2250@gmail.com>
Re: Add 'worker_type' to pg_stat_subscription Amit Kapila <amit.kapila16@gmail.com>
Re: Add 'worker_type' to pg_stat_subscription Michael Paquier <michael@paquier.xyz>
On Wed, Aug 16, 2023 at 07:14:18PM +1000, Peter Smith wrote:
> Earlier this year I proposed a small change for the pg_stat_subscription view:
> 
> ------
> ...it would be very useful to have an additional "kind" attribute for
> this view. This will save the user from needing to do mental
> gymnastics every time just to recognise what kind of process they are
> looking at.
> ------
> 
> At that time Amit replied [1] that this could be posted as a separate
> enhancement thread.
> 
> Now that the LogicalRepWorkerType has been recently pushed [2]
> (something with changes in the same area of the code) it seemed the
> right time to resurrect my pg_stat_subscription proposal.

This sounds generally reasonable to me.

      
       
+       worker_type text
+      
+      
+       Type of the subscription worker process. Possible values are:
+       
+        
+        
+          a: apply worker
+         
+        
+        
+         
+          p: parallel apply worker
+         
+        
+        
+         
+          t: tablesync worker
+         
+        
+       
+      
+     

Is there any reason not to spell out the names?  I think that would match
the other system views better (e.g., backend_type in pg_stat_activity).
Also, instead of "tablesync worker", I'd suggest using "synchronization
worker" to match the name used elsewhere in this table.

I see that the table refers to "leader apply workers".  Would those show up
as parallel apply workers in the view?  Can we add another worker type for
those?

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


В списке pgsql-hackers по дате отправления
От: Melanie Plageman
Дата:
От: Robert Haas
Дата:
FAQ