Re: Hybrid Hash/Nested Loop joins and caching results from subplans
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: Zhihong Yu <zyu@yugabyte.com>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>,
Andres Freund <andres@anarazel.de>, Andy Fan <zhihui.fan1213@gmail.com>,
Alvaro Herrera <alvherre@alvh.no-ip.org>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2021-04-01T10:23:05Z
Lists: pgsql-hackers
Attachments
- v20-0001-Add-Result-Cache-executor-node.patch (text/plain) patch v20-0001
On Thu, 1 Apr 2021 at 12:49, David Rowley <dgrowleyml@gmail.com> wrote: > I'm off to look at the buildfarm now. Well, it looks like the buildfarm didn't like the patch much. I had to revert the patch. It appears I overlooked some details in the EXPLAIN ANALYZE output when force_parallel_mode = regress is on. To make this work I had to change the EXPLAIN output so that it does not show the main process's cache Hit/Miss/Eviction details when there are zero misses. In the animals running force_parallel_mode = regress there was an additional line for the parallel worker containing the expected cache hits/misses/evictions as well as the one for the main process. The main process was not doing any work. I took inspiration from show_sort_info() which does not show the details for the main process when it did not help with the Sort. There was also an issue on florican [1] which appears to be due to that machine being 32-bit. I should have considered that when thinking of the cache eviction test. I originally tried to make the test as small as possible by lowering work_mem down to 64kB and only using enough rows to overflow that by a small amount. I think what's happening on florican is that due to all the pointer fields in the cache being 32-bits instead of 64-bits that more records fit into the cache and there are no evictions. I've scaled that test up a bit now to use 1200 rows instead of 800. The 32-bit machines also were reporting a different number of exact blocks in the bitmap heap scan. I've now just disabled bitmap scans for those tests. I've attached the updated patch. I'll let the CFbot grab this to ensure it's happy with it before I go looking to push it again. David [1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=florican&dt=2021-04-01%2000%3A28%3A12
Commits
-
Add Result Cache executor node (take 2)
- 9eacee2e62d8 14.0 landed
-
Add Result Cache executor node
- b6002a796dc0 14.0 landed
-
Allow estimate_num_groups() to pass back further details about the estimation
- ed934d4fa30f 14.0 landed
-
Allow users of simplehash.h to perform direct deletions
- ff53d7b159b9 14.0 landed
-
Cache if PathTarget and RestrictInfos contain volatile functions
- f58b230ed0db 14.0 landed
-
Fix pull_varnos' miscomputation of relids set for a PlaceHolderVar.
- 55dc86eca70b 14.0 cited