On Wed, Jan 18, 2023 12:36 PM Amit Kapila <amit.kapil...@gmail.com> wrote: > On Tue, Jan 17, 2023 at 8:07 PM Masahiko Sawada <sawada.m...@gmail.com> > wrote: > > > > On Tue, Jan 17, 2023 at 6:14 PM houzj.f...@fujitsu.com > > <houzj.f...@fujitsu.com> wrote: > > > > > > On Tuesday, January 17, 2023 2:46 PM Masahiko Sawada > <sawada.m...@gmail.com> wrote: > > > > > > > > On Tue, Jan 17, 2023 at 12:37 PM houzj.f...@fujitsu.com > > > > <houzj.f...@fujitsu.com> wrote: > > > > I'm slightly concerned that there could be overhead of executing > > > > GetLeaderApplyWorkerPid () for every backend process except for parallel > > > > query workers. The number of such backends could be large and > > > > GetLeaderApplyWorkerPid() acquires the lwlock. For example, does it > make > > > > sense to check (st_backendType == B_BG_WORKER) before calling > > > > GetLeaderApplyWorkerPid()? Or it might not be a problem since it's > > > > LogicalRepWorkerLock which is not likely to be contended. > > > > > > Thanks for the comment and I think your suggestion makes sense. > > > I have added the check before getting the leader pid. Here is the new > version patch. > > > > Thank you for updating the patch. Looks good to me. > > > > Pushed.
Rebased and attach remaining patches for reviewing. Regards, Wang Wei
v84-0001-Stop-extra-worker-if-GUC-was-changed.patch
Description: v84-0001-Stop-extra-worker-if-GUC-was-changed.patch
v84-0002-Add-GUC-stream_serialize_threshold-and-test-seri.patch
Description: v84-0002-Add-GUC-stream_serialize_threshold-and-test-seri.patch
v84-0003-Retry-to-apply-streaming-xact-only-in-apply-work.patch
Description: v84-0003-Retry-to-apply-streaming-xact-only-in-apply-work.patch