Re: Reducing memory consumed by RestrictInfo list translations in partitionwise join planning
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
From: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: David Rowley <dgrowleyml@gmail.com>,
Amit Langote <amitlangote09@gmail.com>, Dmitry Dolgov <9erthalion6@gmail.com>, tomas@vondra.me,
vignesh C <vignesh21@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>,
Richard Guo <guofenglinux@gmail.com>
Date: 2025-03-29T11:54:51Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add assertion to verify derived clause has constant RHS
- 887160d1beae 18.0 landed
-
Make derived clause lookup in EquivalenceClass more efficient
- 88f55bc97622 18.0 landed
-
Doc: improve documentation for jsonpath behavior.
- 7014c9a4bba2 17.0 cited
-
Work around implementation restriction in adjust_appendrel_attrs.
- 767c598954bb 16.0 cited
On Fri, Mar 28, 2025 at 10:46 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote: > > On 2025-Mar-28, David Rowley wrote: > > > I experimented by applying your v4 along with 0001-0003 of Yuya's v35 > > patchset from [2]. See the attached bz2 for my results run on an AMD > > Zen2 machine. The CREATE TABLE statement is in the attached script. > > Eyeballing these results, unless I am misreading them, the patch brings > zero benefit. > > With PWJ off, there's no plan time improvement and no memory consumption > improvement either; only with Watari-san's patch there's an improvement > in plan time (and with Watari's patch, I see negligible difference > between the case with 64 buckets and the other case, which I assume has > 256 buckets). But the "master" vs. "v4_patch" cases seem to be > essentially identical. > > With PWJ on, the situation is the same. master_pwj looks pretty much > the same as v4_pwj. My patch optimizes create_join_clause() which is invoked when planning index scans. David's script does not create any indexes - implicit or explicit. My script for example has the partition key as primary key. So this is not surprising. If the script is modified to create the partitioned table with the primary key, it gives similar results as mine. That also explains why he doesn't see any changes in memory consumption. EC members are created irrespective of whether there are indexes or not and Yuya's first three patches are related to ec_members handling. So those show some improvement with David's script. -- Best Wishes, Ashutosh Bapat