public inbox for [email protected]
help / color / mirror / Atom feedFrom: Nazir Bilal Yavuz <[email protected]>
To: Masahiko Sawada <[email protected]>
Cc: Anthonin Bonnefoy <[email protected]>
Cc: Alena Rybakina <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Fix parallel vacuum buffer usage reporting
Date: Mon, 13 May 2024 16:10:39 +0300
Message-ID: <CAN55FZ1tPTwExqkJPnWt_eSpPHjVm_mMAH3he2dq+HLk9dYTLA@mail.gmail.com> (raw)
In-Reply-To: <CAD21AoBdNjWkHaRmpQ=zd0xRoMfDD5G7Lzw712diY_pozpq5+Q@mail.gmail.com>
References: <CAO6_XqrQk+QZQcYs_C6nk0cMfHuUWk85vT9CrcA1NffFbAVE2A@mail.gmail.com>
<CAD21AoBOkX+QBUqotOS-Cob+9t0pO49+rrpiMcgZfdEsVLA0uw@mail.gmail.com>
<CAO6_Xqpt9t4Oyn9TBS9HeOupfuaH1B4xU9SYbs7k86cVK6m92w@mail.gmail.com>
<[email protected]>
<CAO6_XqrJeHrPtE9z0dt3O9xqq3097-LWO9xNYbnjh_iMmurzgw@mail.gmail.com>
<CAD21AoAK=f_mEm3-FPJT75dm=nESUgknixEq0WHWkn7+-S6-Kg@mail.gmail.com>
<[email protected]>
<CAO6_XqpCxQ0VkdkV_Ah_v=W1v3wt=pfGQssXGeuHrbMsUG=Bzg@mail.gmail.com>
<[email protected]>
<CAD21AoCX2oa_GSbmvc72ZAZ=LVK7y7tMJB8duFsTevBGMwp8rg@mail.gmail.com>
<CAO6_Xqr7_Yp8cJ_6HbVxaWW=owj4VJFbzcjmjgS4Y0CS7hL0TQ@mail.gmail.com>
<CAD21AoCBJE-ZXNfrKqdHcR=p0ETS7ABJEBkt5WEBKDwToQnkFQ@mail.gmail.com>
<CAN55FZ0RQZHTe=UPGgYLJw06V6ZrtNVrj1egYMtu7__bWxA9=A@mail.gmail.com>
<CAD21AoBdNjWkHaRmpQ=zd0xRoMfDD5G7Lzw712diY_pozpq5+Q@mail.gmail.com>
Hi,
On Fri, 10 May 2024 at 19:09, Masahiko Sawada <[email protected]> wrote:
>
> On Fri, May 10, 2024 at 7:26 PM Nazir Bilal Yavuz <[email protected]> wrote:
> >
> > Hi,
> >
> > Thank you for working on this!
> >
> > On Wed, 1 May 2024 at 06:37, Masahiko Sawada <[email protected]> wrote:
> > >
> > > Thank you for further testing! I've pushed the patch.
> >
> > I realized a behaviour change while looking at 'Use pgBufferUsage for
> > block reporting in analyze' thread [1]. Since that change applies here
> > as well, I thought it is better to mention it here.
> >
> > Before this commit, VacuumPageMiss did not count the blocks if its
> > read was already completed by other backends [2]. Now,
> > 'pgBufferUsage.local_blks_read + pgBufferUsage.shared_blks_read'
> > counts every block attempted to be read; possibly double counting if
> > someone else has already completed the read.
>
> True. IIUC there is such a difference only in HEAD but not in v15 and
> v16. The following comment in WaitReadBuffers() says that it's a
> traditional behavior that we count blocks as read even if someone else
> has already completed its I/O:
>
> /*
> * We count all these blocks as read by this backend. This is traditional
> * behavior, but might turn out to be not true if we find that someone
> * else has beaten us and completed the read of some of these blocks. In
> * that case the system globally double-counts, but we traditionally don't
> * count this as a "hit", and we don't have a separate counter for "miss,
> * but another backend completed the read".
> */
>
> So I think using pgBufferUsage for (parallel) vacuum is a legitimate
> usage and makes it more consistent with other parallel operations.
That sounds logical. Thank you for the clarification.
--
Regards,
Nazir Bilal Yavuz
Microsoft
view thread (21+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Fix parallel vacuum buffer usage reporting
In-Reply-To: <CAN55FZ1tPTwExqkJPnWt_eSpPHjVm_mMAH3he2dq+HLk9dYTLA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox