Re: [HACKERS] Review: GIN non-intrusive vacuum of posting tree - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: [HACKERS] Review: GIN non-intrusive vacuum of posting tree
Date
Msg-id f288a763-454e-297f-a60f-19b7259b7c96@sigaev.ru
Whole thread Raw
In response to Re: [HACKERS] Review: GIN non-intrusive vacuum of posting tree  (Andrew Borodin <borodin@octonica.com>)
Responses Re: [HACKERS] Review: GIN non-intrusive vacuum of posting tree  (Andrew Borodin <borodin@octonica.com>)
List 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@sigaev.ru
  WWW: http://www.sigaev.ru/
 



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] Re: [COMMITTERS] pgsql: Fix and simplify check forwhether we're running as Windows serv
Next
From: Stephen Frost
Date:
Subject: Re: [HACKERS] increasing the default WAL segment size