Re: [PATCH] Push limit to sort through a subquery
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Douglas Doole <dougdoole@gmail.com>,
Konstantin Knizhnik <k.knizhnik@postgrespro.ru>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-08-24T16:49:05Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes: > Buildfarm members with force_parallel_mode=regress are failing now. I > haven't had a chance to investigate exactly what's going on here, but > I think there are probably several issues: > 1. It's definitely the case that the details about a sort operation > aren't propagated from a worker back to the leader. This has elicited > complaint previously. Check; this must be the explanation for the buildfarm failures. That'd be worth fixing but it seems like material for an independent patch. > 2. pass_down_bound() probably gets the Gather node at the top of the > tree and stops, since it doesn't know how to pass down a bound through > a Gather. We could probably teach it to pass down the bound through > Gather or Gather Merge on the same theory as Append/MergeAppend. While that might be worth doing, it's not the issue here, because the forced Gather is on top of the Limit node. > In the short run, I'm not sure we have a better alternative than > removing this test - unless somebody has a better idea? - but it would > be good to work on all of the above problems. To get the buildfarm back to green, I agree with the suggestion of setting force_parallel_mode=off for this test, at least for now. I don't greatly like the way that the regression test case filters the output; it hides too much IMO. I'd be inclined to try to return the EXPLAIN output with as much detail preserved as possible. Maybe we could use regex substitution on lines of the output to get rid of stuff that won't be invariant. Unless you're already on it, I can go do that. regards, tom lane
Commits
-
Propagate sort instrumentation from workers back to leader.
- bf11e7ee2e36 11.0 landed
-
Push tuple limits through Gather and Gather Merge.
- 3452dc5240da 11.0 landed
-
Code review for pushing LIMIT through subqueries.
- 3f4c7917b3bc 11.0 landed
-
Make new regression test case parallel-safe, and improve its output.
- 1177ab1dabf7 11.0 landed
-
Push limit through subqueries to underlying sort, where possible.
- 1f6d515a67ec 11.0 landed
-
Move targetlist SRF handling from expression evaluation to new executor node.
- 69f4b9c85f16 10.0 cited