On Sun, Nov 1, 2026 at 5:46 AM shihao zhong <[email protected]> wrote:
>
> Sorry, I was not clear. The code is fine, I only meant the comment.
>
> update_exists also passes NULL, but a search did happen before it.
> So "NULL if no search was done" is not quite right.
>

How about changing it to: "NULL for ERROR-level insert/update conflicts."?

>
> 0002 looks good. Maybe add a hint to the new error in
> lock_conflictlog_relation(), like the two in subscriptioncmds.c.
>

How about adding detail and hint as follows:

ereport(ERROR,
errcode(ERRCODE_LOCK_NOT_AVAILABLE),
errmsg("could not obtain lock on conflict log table of subscription \"%s\"",
  MySubscription->name));
errdetail("A prepared transaction of this subscription may hold a lock
on its conflict log table, and another session is waiting on it."),
errhint("If a session is waiting for that lock, cancel it and let the
apply worker retry."));

-- 
With Regards,
Amit Kapila.


Reply via email to