On Thu, Nov 5, 2026 at 4:52 PM Dilip Kumar <[email protected]> wrote:
>
> 2.
>      ereport(ERROR,
>   (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
> - errmsg("logical replication parallel apply worker exited due to error"),
> - errcontext("%s", edata.context)));
> + errmsg("logical replication parallel apply worker exited due to
> error, exiting leader as well")));
>
> Do we really need ", exiting leader as well"" part of the error
> message?  I mean if we just say "logical replication parallel apply
> worker exited due to error" isn't it obvious that leader will be
> exited as well with elevel ERROR.
>

Yes, but also note that on error/stop of leader apply worker, other
parallel apply workers will also be terminated. See
logicalrep_worker_onexit. How about slightly more descriptive message
as follows or something on those lines:
errmsg("logical replication parallel apply worker exited due to error"),
errdetail("The apply worker will now exit, which also stops the other
parallel apply workers.")

-- 
With Regards,
Amit Kapila.


Reply via email to