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

From Pavan Deolasee
Subject Re: Vacuum: allow usage of more than 1GB of work mem
Date
Msg-id CABOikdMzm_jupTigw+8ksfTVCS3QOP_FW3sG15050km3nZbtSw@mail.gmail.com
Whole thread Raw
In response to Re: Vacuum: allow usage of more than 1GB of work mem  (Pavan Deolasee <pavan.deolasee@gmail.com>)
List pgsql-hackers


On Fri, Sep 16, 2016 at 9:09 AM, Pavan Deolasee <pavan.deolasee@gmail.com> wrote:

I also realised that we can compact the TID array in step (b) above because we only need to store 17 bits for block numbers (we already know which 1GB segment they belong to). Given that usable offsets are also just 13 bits, TID array needs only 4 bytes per TID instead of 6. 


Actually this seems like a clear savings of at least 30% for all use cases, at the cost of allocating in smaller chunks and doing some transformations. But given the problem we are trying to solve, seems like a small price to pay.

Thanks,
Pavan

--
 Pavan Deolasee                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Parallel sec scan in plpgsql
Next
From: Amit Kapila
Date:
Subject: Re: Hash Indexes