From: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, John Naylor <johncnaylorls(at)gmail(dot)com>, Tomas Vondra <tomas(at)vondra(dot)me>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Parallel heap vacuum |
Date: | 2025-03-12 10:18:32 |
Message-ID: | CAFiTN-uqq9icbjq_2W0OE=Abqbs2uL+t0n4_uCDyGFTXKYdsrw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Mar 12, 2025 at 3:40 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Wed, Mar 12, 2025 at 11:24 AM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
> >
> > On Wed, Mar 12, 2025 at 3:17 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> > >
> > > On Tue, Mar 11, 2025 at 5:51 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> > > >
> >
> > Some thoughts/questions on the idea
> >
> > I notice that we are always considering block-level parallelism for
> > heaps and object-level parallelism for indexes. I'm wondering, when
> > multiple tables are being vacuumed together—either because the user
> > has provided a list of tables or has specified a partitioned table
> > with multiple children—does it still make sense to default to
> > block-level parallelism? Or could we consider table-level parallelism
> > in such cases? For example, if there are 4 tables and 6 workers, with
> > 2 tables being small and the other 2 being large, perhaps we could
> > allocate 4 workers to vacuum all 4 tables in parallel. For the larger
> > tables, we could apply block-level parallelism, using more workers for
> > internal parallelism. On the other hand, if all tables are small, we
> > could just apply table-level parallelism without needing block-level
> > parallelism at all. This approach could offer more flexibility, isn't
> > it?
> >
>
> I have not thought from this angle, but it seems we can build this
> even on top of block-level vacuum for large tables.
Yes, that can be built on top of block-level vacuum. In that case, we
can utilize the workers more efficiently, depending on how many
workers we have and how many tables need to be vacuumed. And yes, that
could also be discussed separately.
--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Rushabh Lathia | 2025-03-12 10:22:38 | Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints |
Previous Message | Amit Kapila | 2025-03-12 10:10:26 | Re: Parallel heap vacuum |