Re: Perform streaming logical transactions by background workers and parallel apply

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, "wangw(dot)fnst(at)fujitsu(dot)com" <wangw(dot)fnst(at)fujitsu(dot)com>, "shiy(dot)fnst(at)fujitsu(dot)com" <shiy(dot)fnst(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Subject: Re: Perform streaming logical transactions by background workers and parallel apply
Date: 2023-01-13 05:05:39
Message-ID: CAHut+Ps87JQyPX5jODYhj91tSsv+ZU_Y=Gq0oK8PepT98nyCfw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 13, 2023 at 2:37 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> > 3.
> >
> > <entry role="catalog_table_entry"><para role="column_definition">
> > + <structfield>leader_pid</structfield> <type>integer</type>
> > + </para>
> > + <para>
> > + 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
> > + </para></entry>
> >
> > I felt this change is giving too many details and ended up just
> > muddying the water.
> >
>
> I see that we give a similar description for other parameters as well.
> For example leader_pid in pg_stat_activity, see client_dn,
> client_serial in pg_stat_ssl. It is better to be consistent here and
> this gives the reader a bit more information when the value is NULL
> for the new column.
>

It is OK to give extra details as those other examples do, but my
point -- where I wrote "the leader apply worker and the (not leader)
apply worker are one-and-the-same process" -- was there are currently
only 3 kinds of workers possible (leader apply, parallel apply,
tablsync). If it is not a "parallel apply" worker then it can only be
one of the other 2. So I think it is sufficient and less confusing to
say:

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 a
synchronization worker.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-01-13 05:20:39 Re: Lazy allocation of pages required for verifying FPI consistency
Previous Message Masahiko Sawada 2023-01-13 05:02:13 Re: Perform streaming logical transactions by background workers and parallel apply