Re: VACUUM memory management - Mailing list pgsql-hackers

From Ibrar Ahmed
Subject Re: VACUUM memory management
Date
Msg-id CALtqXTcxcHe2jaCD8SXKjx2NUCsceh4iwFJnRe1r=rejkUfYxw@mail.gmail.com
Whole thread Raw
In response to RE: VACUUM memory management  ("k.jamison@fujitsu.com" <k.jamison@fujitsu.com>)
Responses Re: VACUUM memory management
List pgsql-hackers


On Wed, Jan 22, 2020 at 11:17 AM k.jamison@fujitsu.com <k.jamison@fujitsu.com> wrote:

Hi Ibrar,

 

Are you still working on this patch?

Currently the patch does not apply mainly because of

recent commits for parallel vacuum have updated the files in this patch.

Kindly rebase it and change the status to "Needs Review" after.

 

Upon quick scan of another thread [1] mentioned above,

I believe the people involved had consensus on the same direction

of allocating mem in chunks, and dynamically alloc when

needed. A point for discussion was the size of chunk allocation.

 

After a brief look of your patch, there's a typo between

declaration and definition of lazy_vacuum_page():

arryindex --> arrindex

 

static int           lazy_vacuum_page(Relation onerel, BlockNumber blkno, Buffer buffer,

-                                                                                   int tupindex, LVRelStats *vacrelstats, Buffer *vmbuffer);

+                                                                                  int arryindex, int tupindex, LVRelStats *vacrelstats, Buffer *vmbuffer);

 

static int

lazy_vacuum_page(Relation onerel, BlockNumber blkno, Buffer buffer,

-                                               int tupindex, LVRelStats *vacrelstats, Buffer *vmbuffer)

+                                              int arrindex, int tupindex, LVRelStats *vacrelstats, Buffer *vmbuffer)

 

Unnecessary change:

-           long                  maxtuples;

-           int                                vac_work_mem = IsAutoVacuumWorkerProcess() &&

+          long        maxtuples;

+          int         vac_work_mem = IsAutoVacuumWorkerProcess() &&

 

Other typo:

+ * pg_bsearch() -- bsearch algorithem for two dimention array.

algorithem --> algorithm

dimention --> dimension

 

I might have missed something more,

but I'll continue reviewing after the rebased patch.

 

Regards,

Kirk Jamison

 

[1] https://www.postgresql.org/message-id/flat/CAGTBQpbDCaR6vv9%3DscXzuT8fSbckf%3Da3NgZdWFWZbdVugVht6Q%40mail.gmail.com

Hi,
Yes, I am working on that. I will send the rebased and updated patch.


--
Ibrar Ahmed

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: making the backend's json parser work in frontend code
Next
From: Mike Lissner
Date:
Subject: [Patch]: Documentation of ALTER TABLE re column type changes onbinary-coercible fields