Re: Fix parallel vacuum buffer usage reporting
Alena Rybakina <lena.ribackina@yandex.ru>
From: Alena Rybakina <lena.ribackina@yandex.ru>
To: Nazir Bilal Yavuz <byavuz81@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>,
Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2024-05-10T11:49:56Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix parallel vacuum buffer usage reporting.
- 5cd72cc0c501 17.0 landed
- f199436c1281 16.3 landed
- faba2f8f35df 15.7 landed
-
Use bump context for TID bitmaps stored by vacuum
- 8a1b31e6e596 17.0 cited
Hi! I could try to check it with the test, but I want to ask you about details, because I'm not sure that I completely understand the test case. You mean that we need to have two backends and on one of them we deleted the tuples before vacuum called the other, do you? On 10.05.2024 13:25, Nazir Bilal Yavuz wrote: > Hi, > > Thank you for working on this! > > On Wed, 1 May 2024 at 06:37, Masahiko Sawada <sawada.mshk@gmail.com> 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. I do not know which > behaviour is correct but I wanted to mention this. > > [1] https://postgr.es/m/CAO6_Xqr__kTTCLkftqS0qSCm-J7_xbRG3Ge2rWhucxQJMJhcRA%40mail.gmail.com > > [2] In the WaitReadBuffers() function, see comment: > /* > * Skip this block if someone else has already completed it. If an > * I/O is already in progress in another backend, this will wait for > * the outcome: either done, or something went wrong and we will > * retry. > */ > -- Regards, Alena Rybakina Postgres Professional: http://www.postgrespro.com The Russian Postgres Company