RE: VACUUM memory management - Mailing list pgsql-hackers

From k.jamison@fujitsu.com
Subject RE: VACUUM memory management
Date
Msg-id OSBPR01MB32070A9ED0DE1CC1146BB9CFEF0C0@OSBPR01MB3207.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: VACUUM memory management  (Ibrar Ahmed <ibrar.ahmad@gmail.com>)
Responses Re: VACUUM memory management  (Ibrar Ahmed <ibrar.ahmad@gmail.com>)
List pgsql-hackers

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

pgsql-hackers by date:

Previous
From: "曾文旌(义从)"
Date:
Subject: Re: [Proposal] Global temporary tables
Next
From: Surafel Temesgen
Date:
Subject: Re: FETCH FIRST clause WITH TIES option