Re: regression coverage gaps for gist and hash indexes

From: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>, Alexander Lakhin <exclusion(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrey Borodin <amborodin86(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: regression coverage gaps for gist and hash indexes
Date: 2023-04-01 04:02:47
Message-ID: 84834c1b-f5c8-06a4-9162-2a597c848067@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 4/1/23 1:13 AM, Andres Freund wrote:
> Hi,
>
> On 2023-03-31 17:00:00 +0300, Alexander Lakhin wrote:
>> 31.03.2023 15:55, Tom Lane wrote:
>>> See also the thread about bug #16329 [1]. Alexander promised to look
>>> into improving the test coverage in this area, maybe he can keep an
>>> eye on the WAL logic coverage too.
>>
>> Yes, I'm going to analyze that area too. Maybe it'll take more time
>> (a week or two) if I encounter some bugs there (for now I observe anomalies
>> with gist__int_ops), but I will definitely try to improve the gist testing.
>
> Because I needed it to verify the changes in the referenced patch, I wrote
> tests exercising killtuples based pruning for gist and hash.
>

Thanks for the patch!

I did not looked at the detail but "just" checked that the coverage is now done.

And Indeed, when running "make check" + "027_stream_regress.pl":

I can see it moving from (without the patch):

function gistXLogDelete called 0 returned 0% blocks executed 0%
function gistRedoDeleteRecord called 0 returned 0% blocks executed 0%
function gistprunepage called 0 returned 0% blocks executed 0%
function _hash_vacuum_one_page called 0 returned 0% blocks executed 0%

to (with the patch):

function gistXLogDelete called 9 returned 100% blocks executed 100%
function gistRedoDeleteRecord called 5 returned 100% blocks executed 100% (thanks to 027_stream_regress.pl)
function gistprunepage called 9 returned 100% blocks executed 79%
function _hash_vacuum_one_page called 12 returned 100% blocks executed 94%

> For now I left the new tests in their own files. But possibly they should be
> in gist.sql and hash_index.sql respectively?

+1 to put them in gist.sql and hash_index.sql.

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2023-04-01 04:50:15 Re: Minimal logical decoding on standbys
Previous Message Thomas Munro 2023-04-01 03:00:04 Re: WL_SOCKET_ACCEPT fairness on Windows