From: | Amit Langote <amitlangote09(at)gmail(dot)com> |
---|---|
To: | David Rowley <dgrowleyml(at)gmail(dot)com> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Record a Bitmapset of non-pruned partitions |
Date: | 2021-09-30 07:25:36 |
Message-ID: | CA+HiwqE76Rps24kwHsd2Cr82Ua07tJC9t9reG0c7ScX9n_xrEA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi David,
On Mon, Aug 2, 2021 at 11:59 AM Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
> On Sun, Aug 1, 2021 at 9:31 PM David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> > On Fri, 30 Jul 2021 at 19:10, Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
> > > interleaved_parts idea looks clever. I wonder if you decided that
> > > it's maybe not worth setting that field in the joinrel's
> > > PartitionBoundInfos? For example, adding the code that you added in
> > > create_list_bounds() also in merge_list_bounds().
> >
> > Currently generate_orderedappend_paths() only checks
> > partitions_are_ordered() for base and other member rels, so setting
> > the field for join rels would be a waste of effort given that it's not
> > used for anything.
> >
> > I've not really looked into the possibility of enabling this
> > optimization for partition-wise joined rels. I know that there's a bit
> > more complexity now due to c8434d64c. I'm not really all that clear on
> > which cases could be allowed here and which couldn't. It would require
> > more analysis and I'd say that's a different patch.
>
> Yeah, that makes sense.
Related to the above, I noticed while looking at
build_merged_partition_bounds() that db632fbca3 missed adding a line
to that function to set interleaved_parts to NULL. Because the
PartitionBoundInfo is only palloc'd (not palloc0'd), interleaved_parts
of a "merged" bounds struct ends up pointing to garbage, so let's fix
that. Attached a patch.
--
Amit Langote
EDB: http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
initialize-inteleaved_parts.patch | application/octet-stream | 612 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | 2021-09-30 07:32:14 | RE: Failed transaction statistics to measure the logical replication progress | |
Previous Message | Greg Nancarrow | 2021-09-30 07:21:03 | Re: Logical replication keepalive flood |