RE: VACUUM memory management

From: "k(dot)jamison(at)fujitsu(dot)com" <k(dot)jamison(at)fujitsu(dot)com>
To: 'Ibrar Ahmed' <ibrar(dot)ahmad(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: RE: VACUUM memory management
Date: 2020-01-22 06:17:33
Message-ID: OSBPR01MB32070A9ED0DE1CC1146BB9CFEF0C0@OSBPR01MB3207.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Surafel Temesgen 2020-01-22 06:19:46 Re: FETCH FIRST clause WITH TIES option
Previous Message 曾文旌 (义从) 2020-01-22 06:16:10 Re: [Proposal] Global temporary tables