Re: Record a Bitmapset of non-pruned partitions

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-10-01 00:37:27
Message-ID: CA+HiwqEHax3rktJxyf==CunhBeuP_vWnS6ypz=ajUnhUPaVg8w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 1, 2021 at 7:07 AM David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> On Thu, 30 Sept 2021 at 20:25, Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
> > 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.
>
> Thanks for the patch.
>
> I think we also need to document that interleaved_parts is not set for
> join relations, otherwise someone may in the future try to use that
> field for an optimisation for join relations. At the moment, per
> generate_orderedappend_paths, we only handle IS_SIMPLE_REL type
> relations.
>
> I've attached a patch that updates the comments to mention this.

Looks good to me. Thanks.

--
Amit Langote
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2021-10-01 01:00:05 Re: Skipping logical replication transactions on subscriber side
Previous Message Jacob Champion 2021-10-01 00:02:06 Re: Support for NSS as a libpq TLS backend