On Wed, Jan 11, 2023 at 9:34 AM houzj.f...@fujitsu.com <houzj.f...@fujitsu.com> wrote: > > On Tuesday, January 10, 2023 7:48 PM Dilip Kumar <dilipbal...@gmail.com> > wrote: > > > > I was looking into 0001, IMHO the pid should continue to represent the main > > apply worker. So the pid will always show the main apply worker which is > > actually receiving all the changes for the subscription (in short working as > > logical receiver) and if it is applying changes through a parallel worker > > then it > > should put the parallel worker pid in a new column called > > 'parallel_worker_pid' > > or 'parallel_apply_worker_pid' otherwise NULL. Thoughts? > > Thanks for the comment. > > IIRC, you mean something like following, right ? > (sorry if I misunderstood) > -- > For parallel apply worker: > 'pid' column shows the pid of the leader, new column parallel_worker_pid > shows its own pid > > For leader apply worker: > 'pid' column shows its own pid, new column parallel_worker_pid shows 0 > -- > > If so, I am not sure if the above is better, because it is changing the > existing column's('pid') meaning, the 'pid' will no longer represent the pid > of > the worker itself. Besides, it seems not consistent with what we have for > parallel query workers in pg_stat_activity. What do you think ? >
+1. I think it makes sense to keep it similar to pg_stat_activity. + <para> + Process ID of the leader apply worker, if this process is a apply + parallel worker. NULL if this process is a leader apply worker or a + synchronization worker. Can we change the above description to something like: "Process ID of the leader apply worker, if this process is a parallel apply worker. NULL if this process is a leader apply worker or does not participate in parallel apply, or a synchronization worker."? -- With Regards, Amit Kapila.