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

From: "wangw(dot)fnst(at)fujitsu(dot)com" <wangw(dot)fnst(at)fujitsu(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(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>
Subject: RE: Perform streaming logical transactions by background workers and parallel apply
Date: 2022-12-27 04:57:00
Message-ID: OS3PR01MB6275B296ADEEA13F1B15C4469EED9@OS3PR01MB6275.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 26, 2022 21:02 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> Thank you for updating the patches. Here are some comments for 0001
> and 0002 patches:

Thanks for your comments.

> I think it'd be better to write logs when the leader enters the
> serialization mode. It would be helpful for investigating issues.

Agree. Added the log about this in the function pa_send_data().

> ---
> +static inline bool
> +am_leader_apply_worker(void)
> +{
> + return (!OidIsValid(MyLogicalRepWorker->relid) &&
> + !isParallelApplyWorker(MyLogicalRepWorker));
> +}
>
> How about using !am_tablesync_worker() instead of
> !OidIsValid(MyLogicalRepWorker->relid) for better readability?

Agree. Improved this as suggested.

The new patch set was attached in [1].

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

Regards,
Wang wei

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2022-12-27 04:57:55 Re: Data loss on logical replication, 12.12 to 14.5, ALTER SUBSCRIPTION
Previous Message wangw.fnst@fujitsu.com 2022-12-27 04:54:02 RE: Perform streaming logical transactions by background workers and parallel apply