From: | "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com> |
---|---|
To: | "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com> |
Cc: | Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, "shiy(dot)fnst(at)fujitsu(dot)com" <shiy(dot)fnst(at)fujitsu(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "wangw(dot)fnst(at)fujitsu(dot)com" <wangw(dot)fnst(at)fujitsu(dot)com>, 'Amit Kapila' <amit(dot)kapila16(at)gmail(dot)com> |
Subject: | RE: Perform streaming logical transactions by background workers and parallel apply |
Date: | 2022-10-06 14:21:10 |
Message-ID: | OS0PR01MB5716583F665219475E117732945C9@OS0PR01MB5716.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thursday, October 6, 2022 9:00 PM Kuroda, Hayato/黒田 隼人 <kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
>
> Dear Hou,
>
> > Thanks for the suggestion.
> >
> > I tried to add a WaitLatch, but it seems affect the performance
> > because the Latch might not be set when leader send some message to
> > parallel apply worker which means it will wait until timeout.
>
> Yes, currently it leader does not notify anything.
> To handle that leader must set a latch in parallel_apply_send_data().
> It can be done if leader accesses to winfo->shared-> logicalrep_worker_slot_no,
> and sets a latch for LogicalRepCtxStruct->worker[slot_no].
Thanks for the suggestion. I think we could do that, but I feel it's not great
to set latch frequently. Besides, to access the LogicalRepCtxStruct->worker[]
we would need to hold a lock which might also bring some overhead.
Best regards,
Hou zj
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2022-10-06 14:25:51 | Re: Transparent column encryption |
Previous Message | Jonathan S. Katz | 2022-10-06 13:33:56 | Re: START_REPLICATION SLOT causing a crash in an assert build |