Worker parallelism on EXECUTE with a non-zero fetch count - Mailing list pgsql-hackers

From Rohit Sivakumar
Subject Worker parallelism on EXECUTE with a non-zero fetch count
Date
Msg-id CABp=a9shsChnqL6n94p1Uqku3o5Exkw9Q8X4pqTwnZVED4v3Bw@mail.gmail.com
Whole thread Raw
List pgsql-hackers
Hi Hackers,

Quoting an excerpt from Chapter 15.2 of postgres' official documentation (versions 12 through latest),

"Even when a parallel query plan is generated for a particular query, there are several circumstances under which it will be impossible to execute that plan in parallel at execution time."

The documentation goes on to describe cases where the plan cannot be executed in parallel, which includes,

The client sends an Execute message with a non-zero fetch count. See the discussion of the extended query protocol ...

I fail to understand why firing the Execute message with a non-zero fetch count is not being parallelized. Is there a technical limitation here, or is it simply that this is a feature that has not been built yet? I noticed that my query was using the Extended protocol, and suffers from this limitation.

As for solutions, I'm aware that using the Simple query protocol gives me the performance I need; but that's not the point of this question. I'd like to fundamentally understand what makes the same parallel-execution behaviour impossible with the Extended query protocol.

Thanks,
Rohit

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: May be BUG. Periodic burst growth of the checkpoint_req counter on replica.
Next
From: Masahiko Sawada
Date:
Subject: Re: Using per-transaction memory contexts for storing decoded tuples