RE: Parallel Apply

Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>

From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: 'Amit Kapila' <amit.kapila16@gmail.com>, shveta malik <shveta.malik@gmail.com>
Cc: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>, Peter Smith <smithpb2250@gmail.com>, Tomas Vondra <tomas@vondra.me>, Dilip Kumar <dilipbalaut@gmail.com>, Andrei Lepikhov <lepihov@gmail.com>, wenhui qiu <qiuwenhuifx@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-27T10:44:19Z
Lists: pgsql-hackers
Dear Amit,

> +1 for the Option-2 as it simplifies the handling in patch as compared
> to others.

OK, let's proceed with the option.

> Apart from that,
> +/*
> + * Worker internal message types
> + *
> + * This type of messages would be generated by leader apply worker and sent to
> + * the parallel apply worker.
> + */
> +typedef enum WorkerInternalMsgType
> +{
> + WORKER_INTERNAL_MSG_DEPENDENCY = 'd',
> + WORKER_INTERNAL_MSG_RELATION = 'i',
> +} WorkerInternalMsgType;
> +
> 
> I think here INTERNAL makes the purpose unclear whereas we know that
> these will always be used to communicate wth parallel apply workers.
> So, how about one of following options:
> 
> typedef enum PAWorkerMsgType
>   {
>       PA_MSG_XACT_DEPENDENCY = 'd',
>       PA_MSG_RELMAP          = 'i',
>   } PAWorkerMsgType;

Since either of them were OK for me, the shorter one is now used.
The latest patch is usable in [1].

[1]: https://www.postgresql.org/message-id/OS9PR01MB121490458FFF58A543ABC32F4F5362%40OS9PR01MB12149.jpnprd01.prod.outlook.com

Best regards,
Hayato Kuroda
FUJITSU LIMITED