Re: New gist vacuum.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michail Nikolaev <michail(dot)nikolaev(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Subject: Re: New gist vacuum.
Date: 2018-03-01 17:44:20
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Michail Nikolaev <michail(dot)nikolaev(at)gmail(dot)com> writes:
> I have added small change to patch to allow it be compiled using msvc (uint64_t -> uint64).
> Everything seems to work, check-world is passing.

> Actually patch fixes two issues:
> 1) Partial GIST indexes now have corrent tuples count estimation.
> 2) Now subsequent calls to VACUUM on GIST index (like "VACCUM table_name") do not change tuples count to estimated number of tuples in table (which is changed even without any updates in table due current implementation).

> I think it is fine to commit.

I took a quick look at this. I wonder what is the point of making
the counting conditional. Since the function is visiting every
index page anyway, why not just always count and unconditionally
provide an exact answer? The number of cycles saved by skipping
"tuplesCount += PageGetMaxOffsetNumber(page)" on each leaf page
is surely trivial.

regards, tom lane

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2018-03-01 17:47:04 Re: pgbench - add \if support
Previous Message Fujii Masao 2018-03-01 17:29:13 Re: [HACKERS] Creating backup history files for backups taken from standbys