Re: Review: GIN non-intrusive vacuum of posting tree

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: pgsql-hackers(at)postgresql(dot)org, Andrew Borodin <amborodin(at)acm(dot)org>
Subject: Re: Review: GIN non-intrusive vacuum of posting tree
Date: 2017-03-22 17:48:17
Message-ID: f288a763-454e-297f-a60f-19b7259b7c96@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> No, second conditional code will be called for any subtree, which
> contains totally empty subtree. That check !isRoot covers case when
> the entire posting tree should be erased: we cannot just quit out of
> recursive cleanup, we have to make a scan here, starting from root.
Oh, I see

> Probably, variable isChildHasVoid has a bit confusing name. This flag
> indicates that some subtree:
> 1. Had empty pages
> 2. Did not bother deleting them, because there is a chance that it is
> a part of a bigger empty subtree.
> May be it'd be better to call the variable "someChildIsVoidSubtree".

hasEmptyChild? and hasNonEmptyChild (BTW, isAnyNonempy has missed 't')

And if the whole posting tree is empty,then we could mark root page as leaf and
remove all other pages in tree without any locking. Although, it could be a task
for separate patch.

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2017-03-22 17:49:33 Re: increasing the default WAL segment size
Previous Message Robert Haas 2017-03-22 17:44:12 Re: Re: [COMMITTERS] pgsql: Fix and simplify check for whether we're running as Windows serv