Re: Assert failure on 'list_member_ptr(rel->joininfo, restrictinfo)'

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Richard Guo <guofenglinux(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Assert failure on 'list_member_ptr(rel->joininfo, restrictinfo)'
Date: 2023-11-19 01:17:29
Message-ID: CAPpHfdugmUqPhr40xmbk5xMQjy96FoJzC0fE6KYBoNbZYHVeDA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 15, 2023 at 5:07 PM Alexander Korotkov <aekorotkov(at)gmail(dot)com> wrote:
>
> On Wed, Nov 15, 2023 at 8:02 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
> > The kinda because there are callers to bms_(add|del)_members() that pass the
> > same bms as a and b, which only works if the reallocation happens "late".
>
> +1,
> Neat idea. I'm willing to work on this. Will propose the patch soon.

It's here. New REALLOCATE_BITMAPSETS forces bitmapset reallocation on
each modification. I also find it useful to add assert to all
bitmapset functions on argument NodeTag. This allows you to find
access to hanging pointers earlier.

I had the feeling of falling into a rabbit hole while debugging all
the cases of failure with this new option. With the second patch
regressions tests pass.

Any thoughts?

------
Regards,
Alexander Korotkov

Attachment Content-Type Size
0001-REALLOCATE_BITMAPSETS-manual-compile-time-option-v1.patch application/octet-stream 12.6 KB
0002-Make-regression-tests-pass-with-REALLOCATE_BITMAP-v1.patch application/octet-stream 2.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2023-11-19 01:22:09 Re: pg_upgrade and logical replication
Previous Message Tomas Vondra 2023-11-19 01:15:33 Re: long-standing data loss bug in initial sync of logical replication