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

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: "shiy(dot)fnst(at)fujitsu(dot)com" <shiy(dot)fnst(at)fujitsu(dot)com>
Cc: "wangw(dot)fnst(at)fujitsu(dot)com" <wangw(dot)fnst(at)fujitsu(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(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-10-31 10:44:06
Message-ID: CAA4eK1L+TLSf47H2f5EGTthWdDve4iABd=3dFTxvV3aP+Ruv_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 28, 2022 at 3:04 PM shiy(dot)fnst(at)fujitsu(dot)com
<shiy(dot)fnst(at)fujitsu(dot)com> wrote:
>
> On Tue, Oct 25, 2022 2:56 PM Wang, Wei/王 威 <wangw(dot)fnst(at)fujitsu(dot)com> wrote:
>
> I tried to write a draft patch to force streaming every change instead of
> waiting until logical_decoding_work_mem is exceeded, which could help to test
> streaming parallel. Attach the patch. This is based on v41-0001 patch.
>

Thanks, I think this is quite useful for testing.

> With this patch, I saw a problem that the subscription option "origin" doesn't
> work when using streaming parallel. That's because when the parallel apply
> worker writing the WAL for the changes, replorigin_session_origin is
> InvalidRepOriginId. In current patch, origin can be active only in one process
> at-a-time.
>
> To fix it, maybe we need to remove this restriction, like what we did in the old
> version of patch.
>

Agreed, we need to allow using origins for writing all the changes by
the parallel worker.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2022-10-31 10:47:46 Re: Support logical replication of DDLs
Previous Message Pavel Borisov 2022-10-31 10:38:23 Lockless queue of waiters in LWLock