Re: Pg10 : Client Configuration for Parallelism ? - Mailing list pgsql-performance

From Tom Lane
Subject Re: Pg10 : Client Configuration for Parallelism ?
Date
Msg-id 28400.1555681398@sss.pgh.pa.us
Whole thread Raw
In response to Re: Pg10 : Client Configuration for Parallelism ?  (Thomas Kellerer <spam_eater@gmx.net>)
List pgsql-performance
Thomas Kellerer <spam_eater@gmx.net> writes:
> laurent.dechambe@orange.com schrieb am 17.04.2019 um 16:33:
>> On jdbc it seems this is equivalent to write :
>> statement. setMaxRows(0);  // parallelism authorized, which is the default.
>> 
>> Thus on my jdbc basic program if I add :
>> statement. setMaxRows(100);  // No parallelism allowed (at least in Pg10)

> This isn't limited to Statement.setMaxRows()
> If you use "LIMIT x" in your SQL query, the same thing happens.

No, not true: queries with LIMIT x are perfectly parallelizable.

The trouble with the protocol-level limit (setMaxRows) is that it
requires being able to suspend the query and resume fetching rows
later.  We don't allow that for parallel query because it would
involve tying up vastly more resources, ie a bunch of worker
processes, not just some extra memory in the client's own backend.

            regards, tom lane



pgsql-performance by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: Pg10 : Client Configuration for Parallelism ?
Next
From: Gaetano Mendola
Date:
Subject: Re: Out of Memory errors are frustrating as heck!