Re: New gist vacuum.
Jeff Janes <jeff.janes@gmail.com>
From: Jeff Janes <jeff.janes@gmail.com>
To: Костя Кузнецов <chapaev28@ya.ru>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2015-10-31T06:55:32Z
Lists: pgsql-hackers
On Thu, Sep 10, 2015 at 3:52 PM, Костя Кузнецов <chapaev28@ya.ru> wrote:
> Hello. I am student from gsoc programm.
> My project is sequantial access in vacuum of gist.
>
> New vacuum has 2 big step:
> physical order scan pages and cleaning after 1 step.
>
>
> 1 scan - scan all pages and create information map(hashmap) and add
> information to rescan stack( stack of pages that needed to rescanning
This is interesting work. I think the patch needs a rebase to the git
HEAD. There is a minor conflict in gistRedoPageUpdateRecord. It is a
little confusing because your patch introduces new code and then
immediately comments it out (using //, which is not a comment style
allowed in our style guide) and that phantom code confuses the
conflict resolution process.
There are several other places throughout the patch that use //
comment style to comment out code which the patch itself added. Those
should be removed, and the real comments should be converted to /*
this */ style.
I also got a compiler warning, it looks like a missing #include:
gistutil.c: In function 'gistNewBuffer':
gistutil.c:788:4: warning: implicit declaration of function
'TransactionIdPrecedes' [-Wimplicit-function-declaration]
if (GistPageIsDeleted(page) &&
TransactionIdPrecedes(p->pd_prune_xid, RecentGlobalDataXmin)) {
^
Also, I didn't see a check on the size of the stack. Is there an
argument that this stack will not be able to grow to be large enough
to cause trouble?
Thanks,
Jeff
Commits
-
Make gistvacuumcleanup() count the actual number of index tuples.
- ccd650430db6 10.4 landed
- 947f06c6224e 9.4.18 landed
- 81b9b5ce490a 11.0 landed
- 6b56f07525a0 9.3.23 landed
- 529137cac9a8 9.6.9 landed
- 46d98da43e56 9.5.13 landed