Re: [HACKERS] GIN non-intrusive vacuum of posting tree

2016-12-02 Thread Robert Haas
On Wed, Nov 30, 2016 at 11:38 AM, Andrew Borodin wrote: > This scan acquires cleanup lock on root of scan (not necessarily root > of posting tree). Cleanup lock ensures no inserts are inside subtree. > Scan traverses subtree DF taking exclusive locks from left to right. > For any page being delete

Re: [HACKERS] GIN non-intrusive vacuum of posting tree

2016-11-30 Thread Andrew Borodin
Here is v1 of the patch. Now it has changes for README and contains more comments clarifying changes of locking model. Also I will elaborate some more on what is patched. Main portion of changes is made to function ginVacuumPostingTreeLeaves(). Before the patch it was traversing tree in depth-firs

Re: [HACKERS] GIN non-intrusive vacuum of posting tree

2016-11-28 Thread Vladimir Borodin
> 28 нояб. 2016 г., в 20:31, Andrew Borodin написал(а): > > This patch solved a problem encountered by Evgeniy Efimkin and > Vladimir Borodin from Yandex.Mail. > > and eventually deleting some of data. This testbed showed VACUUM > holding inserts for up to tenths of seconds. They claim that pro

[HACKERS] GIN non-intrusive vacuum of posting tree

2016-11-28 Thread Andrew Borodin
Hi hackers! Here is a patch with more concurrency-friendly vacuum of GIN. ===Short problem statement=== Currently GIN vacuum during cleaning posting tree can lock this tree for a long time without real need. ===Problem statement=== Vacuum of posting tree (function ginVacuumPostingTree() in ginva