Re: Perform streaming logical transactions by background workers and parallel apply - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Perform streaming logical transactions by background workers and parallel apply
Date
Msg-id CAA4eK1+OBVyu5Vy3dCH_ofF7qBprdB9iq-71Pa1kynii_Ly0UQ@mail.gmail.com
Whole thread Raw
In response to RE: Perform streaming logical transactions by background workers and parallel apply  ("kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>)
List pgsql-hackers
On Thu, Oct 6, 2022 at 6:09 PM kuroda.hayato@fujitsu.com
<kuroda.hayato@fujitsu.com> wrote:
>
> ~~~
> 10. worker.c - apply_handle_stream_start
>
> ```
> + *
> + * XXX We can avoid sending pair of the START/STOP messages to the parallel
> + * worker because unlike apply worker it will process only one
> + * transaction-at-a-time. However, it is not clear whether that is worth the
> + * effort because it is sent after logical_decoding_work_mem changes.
> ```
>
> I can understand that START message is not needed, but is STOP really removable? If leader does not send STOP to its
child,does it lose a chance to change the worker-state to IDLE_IN_TRANSACTION?
 
>

I think if we want we can set that state before we went to sleep in
parallel apply worker. So, I guess ideally we don't need both of these
messages but for now, it is fine as mentioned in the comments.

-- 
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Richard Guo
Date:
Subject: Re: Use LIMIT instead of Unique for DISTINCT when all distinct pathkeys are redundant
Next
From: Julien Rouhaud
Date:
Subject: Re: how to correctly react on exception in pfree function?