Re: es_query_dsa is broken

From: Andres Freund <andres(at)anarazel(dot)de>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: es_query_dsa is broken
Date: 2018-04-11 16:04:21
Message-ID: 20180411160421.ni5eif7g7wz7pnnc@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2017-12-07 12:51:56 +1300, Thomas Munro wrote:
> 1. Removing es_query_dsa and injecting the right context into the
> executor tree as discussed.
>
> 2. Another idea mentioned by Robert in an off-list chat: We could
> consolidate all DSM segments in a multi-gather plan into one. See the
> nearby thread where someone had over a hundred Gather nodes and had to
> crank up max_connections to reserve enough DSM slots. Of course,
> optimising for that case doesn't make too much sense (I suspect
> multi-gather plans will become less likely with Parallel Append and
> Parallel Hash in the picture anyway), but it would reduce a bunch of
> duplicated work we do when it happens as well as scarce slot
> consumption. If we did that, then all of a sudden es_query_dsa would
> make sense again (ie it'd be whole-query scoped), and we could revert
> that hacky change.
>
> Or we could do both things anyway.

This is an open item for v11:

Tidy up es_query_dsa and possibly ParallelWorkerContext?
Original commit: e13029a5ce353574516c64fd1ec9c50201e705fd (principal author: Thomas Munro; owner: Robert Haas)
Bug fix: fd7c0fa732d97a4b4ebb58730e6244ea30d0a618
While the bug was fixed with something back-patchable, we should considering improving this situation. As discussed in the above-linked thread, options might include (1) getting rid of es_query_dsa entirely and injecting dependencies into nodes, (2) making all Gather nodes share the same DSM segment so there truly could be per-query DSA segment.

Do we want to make any changes here for v11? If not, are we ok with just
closing the entry and waiting till it bugs anybody for some reason?

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-04-11 16:06:24 Re: missing support of named convention for procedures
Previous Message Andres Freund 2018-04-11 16:02:31 Re: WARNING in parallel index creation.