Re: Set access strategy for parallel vacuum workers

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Peter Geoghegan <pg(at)bowt(dot)ie>, Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>
Subject: Re: Set access strategy for parallel vacuum workers
Date: 2021-04-07 13:41:55
Message-ID: CALj2ACWU0jJL6nP6AWF5Ybr=LfysJ2QQ-zgYx-Hv7FOK_Mnckw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 7, 2021 at 3:30 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> During recent developments in the vacuum, it has been noticed [1] that
> parallel vacuum workers don't use any buffer access strategy. I think
> we can fix it either by propagating the required information from the
> leader or just get the access strategy in each worker separately. The
> patches for both approaches for PG-13 are attached.
>
> Thoughts?
>
> [1] - https://www.postgresql.org/message-id/CAH2-Wz%3Dgf6FXW-jPVRdeCZk0QjhduCqH_XD3QbES9wPmhircuA%40mail.gmail.com

Note: I have not followed the original discussion in [1].

My understanding of the approach #1 i.e. propagating the vacuum
strategy down to the parallel vacuum workers from the leader is that
the same ring buffer (of 256KB for vacuum) will be used by both leader
and all the workers. In that case, I think we see more page flushes
(thus more IO) because 256KB is now shared by all of them. Whereas
with approach #2 each worker gets its own ring buffer (of 256KB) thus
less IO occurs compared to approach #1.

And in case of parallel inserts (although they are not yet committed
and in various levels discussions) we let each worker get its own ring
buffer (of size 16MB). Whatever the approach is chosen here, I think
it should be consistent.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2021-04-07 13:55:22 Re: [PATCH] Improve treatment of page special and page header alignment during page init.
Previous Message Tom Lane 2021-04-07 13:40:37 Re: Increase value of OUTER_VAR