Re: New gist vacuum. - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: New gist vacuum.
Date
Msg-id C6DBDFBF-7D5D-4FFE-8D42-5FEC4481EE77@yandex-team.ru
Whole thread Raw
In response to Re: New gist vacuum.  (Andrey Borodin <x4mmm@yandex-team.ru>)
Responses Re: New gist vacuum.  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
List pgsql-hackers
Hi!

> 28 дек. 2017 г., в 16:37, Andrey Borodin <x4mmm@yandex-team.ru> написал(а):
> Here is new version of the patch for GiST VACUUM.
> There are two main changes:
> 1. During rescan for page deletion only know to be recently empty pages are rescanned.
> 2. I've re-implemented physical scan with array instead of hash table.

There is one more minor spot in GiST VACUUM. It takes heap tuples count for statistics for partial indexes, while it
shouldnot.  

If gistvacuumcleanup() is not given a statistics gathered by gistbulkdelete() it returns incorrect tuples count for
partialindex. 
Here's the micropatch, which fixes that corner case.
To reproduce this effect I used this query:
create table y as select cube(random()) c from generate_series(1,10000) y; create index on y using gist(c) where c~>1 >
0.5;
vacuum verbose y;
Before patch it will report 10000 tuples, with patch it will report different values around 5000.

I do not know, should I register separate commitfest entry? The code is very close to main GiST VACUUM patch, but
solvesa bit different problem. 

Best regards, Andrey Borodin.

Attachment

pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: [PATCH] session_replication_role = replica with TRUNCATE
Next
From: Simon Riggs
Date:
Subject: Changing WAL Header to reduce contention during ReserveXLogInsertLocation()