Re: Race conditions during parallel worker (unclean) exit

From: Sami Imseih <samimseih(dot)pg(at)gmail(dot)com>
To: Antonin Houska <ah(at)cybertec(dot)at>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Race conditions during parallel worker (unclean) exit
Date: 2026-09-09 21:38:27
Message-ID: CAN12+YJWWfhRZT7MdpD178=kARuXufeDAGheELa=VY8nJqs=yw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > It seems cleaner to introduce a separate message for this case, maybe
> > "PqMsg_ParallelAborted", and keep the existing
> > "ERROR: lost connection to parallel worker" message.
>
> I'm not sure this is worth adjusting the FE/BE protocol. I'd prefer regular
> ERROR message (PqMsg_ErrorResponse), but only in some minimalistic form. The
> worker would only send the message, w/o doing any error handling itself.

Perhaps PqMsg_ErrorResponse could work, although I am not clear what a
minimalistic
form means here. I was thinking of PqMsg_ParallelAborted because we
have precedent
already with PqMsg_Progress which was introduced in f1889729dd3a as
the 'P' message
for parallel index progress reported, but later converted to a macro
in a99cc6c6b4b.

(I think it was wrong to name it PqMsg_Progress, but that's besides
the point here).

--
Sami Imseih
Amazon Web Service (AWS)

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Nathan Bossart 2026-09-09 21:31:04 Re: Add pg_nodiscard decorations to Bitmapset functions