Remove dependency on VacuumPage(Hit/Miss/Dirty) counters in do_analyze_rel

Started by Dilip Kumarover 2 years ago3 messageshackers

Thread notes

1 note#refactor
hackorum-bot#refactor
hackorum-bot
1 day ago

@global #refactor

#refactor
Jump to latest
#1Dilip Kumar
dilipbalaut@gmail.com

As part of commit 5cd72cc0c5017a9d4de8b5d465a75946da5abd1d, the
dependency on global counters such as VacuumPage(Hit/Miss/Dirty) was
removed from the vacuum. However, do_analyze_rel() was still using
these counters, necessitating the tracking of global counters
alongside BufferUsage counters.

The attached patch addresses the issue by eliminating the need to
track VacuumPage(Hit/Miss/Dirty) counters in do_analyze_rel(), making
the global counters obsolete. This simplifies the code and improves
consistency.

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

Attachments:

t49740_1
v1-0001-Remove-duplicate-tracking-of-the-page-stats-durin.patchapplication/octet-stream; name=v1-0001-Remove-duplicate-tracking-of-the-page-stats-durin.patchDownload+12-33
#2Anthonin Bonnefoy
anthonin.bonnefoy@datadoghq.com
In reply to: Dilip Kumar (#1)
Re: Remove dependency on VacuumPage(Hit/Miss/Dirty) counters in do_analyze_rel

Hi,

I sent a similar patch for this in
/messages/by-id/CAO6_Xqr__kTTCLkftqS0qSCm-J7_xbRG3Ge2rWhucxQJMJhcRA@mail.gmail.com

Regards,
Anthonin

On Thu, Jun 6, 2024 at 11:10 AM Dilip Kumar <dilipbalaut@gmail.com> wrote:

Show quoted text

As part of commit 5cd72cc0c5017a9d4de8b5d465a75946da5abd1d, the
dependency on global counters such as VacuumPage(Hit/Miss/Dirty) was
removed from the vacuum. However, do_analyze_rel() was still using
these counters, necessitating the tracking of global counters
alongside BufferUsage counters.

The attached patch addresses the issue by eliminating the need to
track VacuumPage(Hit/Miss/Dirty) counters in do_analyze_rel(), making
the global counters obsolete. This simplifies the code and improves
consistency.

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

#3Dilip Kumar
dilipbalaut@gmail.com
In reply to: Anthonin Bonnefoy (#2)
Re: Remove dependency on VacuumPage(Hit/Miss/Dirty) counters in do_analyze_rel

On Thu, Jun 6, 2024 at 3:23 PM Anthonin Bonnefoy
<anthonin.bonnefoy@datadoghq.com> wrote:

Hi,

I sent a similar patch for this in /messages/by-id/CAO6_Xqr__kTTCLkftqS0qSCm-J7_xbRG3Ge2rWhucxQJMJhcRA@mail.gmail.com

Okay, I see, In that case, we can just discard mine, thanks for notifying me.

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com