RE: Parallel heap vacuum - Mailing list pgsql-hackers

From Hayato Kuroda (Fujitsu)
Subject RE: Parallel heap vacuum
Date
Msg-id TYAPR01MB5692D81B297E57825CB83A36F52F2@TYAPR01MB5692.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: Parallel heap vacuum  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-hackers
Dear Swada-san,

> 
> BTW while updating the patch, I found that we might want to launch
> different numbers of workers for scanning heap and vacuuming heap. The
> number of parallel workers is determined based on the number of blocks
> in the table. However, even if this number is high, it could happen
> that we want to launch fewer workers to vacuum heap pages when there
> are not many pages having garbage. And the number of workers for
> vacuuming heap could vary on each vacuum pass. I'm considering
> implementing it.

Just to clarify - this idea looks good to me. I imagine you will add new APIs for
tableam like parallel_vacuum_compute_workers_for_scaning and parallel_vacuum_compute_workers_for_vacuuming.
If other tableam developers want to use the same number of workers as scanning,
they can pass the same function to the pointer. Is it right?

Best regards,
Hayato Kuroda
FUJITSU LIMITED


pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Generating configure from configure.ac
Next
From: Tom Lane
Date:
Subject: Re: Generating configure from configure.ac