Re: Vacuum: allow usage of more than 1GB of work mem - Mailing list pgsql-hackers

From Claudio Freire
Subject Re: Vacuum: allow usage of more than 1GB of work mem
Date
Msg-id CAGTBQpZwNDQE-AQTuOab8F55=oWvTU6sFnsnRqLVdE4yOi3kbQ@mail.gmail.com
Whole thread Raw
In response to Re: Vacuum: allow usage of more than 1GB of work mem  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: Vacuum: allow usage of more than 1GB of work mem
List pgsql-hackers
On Thu, Sep 15, 2016 at 3:48 PM, Tomas Vondra
<tomas.vondra@2ndquadrant.com> wrote:
> For example, we always allocate the TID array as large as we can fit into
> m_w_m, but maybe we don't need to wait with switching to the bitmap until
> filling the whole array - we could wait as long as the bitmap fits into the
> remaining part of the array, build it there and then copy it to the
> beginning (and use the bitmap from that point).

The bitmap can be created like that, but grow from the end of the
segment backwards.

So the scan can proceed until the bitmap fills the whole segment
(filling backwards), no copy required.

I'll try that later, but first I'd like to get multiarray approach
right since that's the basis of it.



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Vacuum: allow usage of more than 1GB of work mem
Next
From: Peter Geoghegan
Date:
Subject: Re: Tuplesort merge pre-reading