Re: tweak to a few index tests to hits ambuildempty() routine.

From: Noah Misch <noah(at)leadboat(dot)com>
To: a(dot)kozhemyakin(at)postgrespro(dot)ru
Cc: Amul Sul <sulamul(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, thomas(dot)munro(at)gmail(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, alvherre(at)alvh(dot)no-ip(dot)org
Subject: Re: tweak to a few index tests to hits ambuildempty() routine.
Date: 2022-09-24 17:20:20
Message-ID: 20220924172020.GB1852696@rfd.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 21, 2022 at 02:10:42PM +0700, a(dot)kozhemyakin(at)postgrespro(dot)ru wrote:
> After analyzing this, I found out why we don't reach that Assert but we have
> coverage shown - firstly, it reached via another test, vacuum; secondly, it
> depends on the gcc optimization flag. We reach that Assert only when using
> -O0.
> If we build with -O2 or -Og that function is not reached (due to different
> results of the heap_prune_satisfies_vacuum() check inside
> heap_page_prune()).

With "make check MAX_CONNECTIONS=1", does that difference between -O0 and -O2
still appear? Compiler optimization shouldn't consistently change pruning
decisions. It could change pruning decisions probabilistically, by changing
which parallel actions overlap. If the difference disappears under
MAX_CONNECTIONS=1, the system is likely fine.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-09-24 17:27:23 Re: [BUG] Logical replica crash if there was an error in a function.
Previous Message Dmitry Dolgov 2022-09-24 14:07:14 Re: pg_stat_statements and "IN" conditions