Re: pgsql: Use streaming read I/O in VACUUM's third phase

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Use streaming read I/O in VACUUM's third phase
Date: 2025-02-14 18:31:42
Message-ID: CAAKRu_Y5Pu9_T9c8Lqr5t=g+9ZzrorKcoywZ-bF8nwEFUME+gg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Fri, Feb 14, 2025 at 12:59 PM Melanie Plageman
<melanieplageman(at)gmail(dot)com> wrote:
>
> Use streaming read I/O in VACUUM's third phase
>
> Make vacuum's third phase (its second pass over the heap), which reaps
> dead items collected in the first phase and marks them as reusable, use
> the read stream API. This commit adds a new read stream callback,
> vacuum_reap_lp_read_stream_next(), that looks ahead in the TidStore and
> returns the next block number to read for vacuum.
>
> Author: Melanie Plageman <melanieplageman(at)gmail(dot)com>
> Co-authored-by: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
> Reviewed-by: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
> Discussion: https://postgr.es/m/CA%2BhUKGKN3oy0bN_3yv8hd78a4%2BM1tJC9z7mD8%2Bf%2ByA%2BGeoFUwQ%40mail.gmail.com
>
> Branch
> ------
> master
>
> Details
> -------
> https://git.postgresql.org/pg/commitdiff/c3e775e608f2a6d0bcfba147bf08a506827cc567
>
> Modified Files
> --------------
> src/backend/access/heap/vacuumlazy.c | 55 ++++++++++++++++++++++++++++++++----
> 1 file changed, 49 insertions(+), 6 deletions(-)

I'm looking into the valgrind failures [1].

==1526248== VALGRINDERROR-END
{
<insert_a_suppression_name_here>
Memcheck:Addr1
fun:lazy_scan_heap
fun:heap_vacuum_rel
fun:table_relation_vacuum
fun:vacuum_rel
fun:vacuum_rel
fun:vacuum
fun:ExecVacuum
fun:standard_ProcessUtility
fun:ProcessUtility
fun:PortalRunUtility
fun:PortalRunMulti
fun:PortalRun
fun:exec_simple_query
}
**1526248** Valgrind detected 492 error(s) during execution of "VACUUM FREEZE;

==1526248== VALGRINDERROR-END
{
<insert_a_suppression_name_here>
Memcheck:Addr8
fun:TidStoreGetBlockOffsets
fun:lazy_vacuum_heap_rel
fun:lazy_vacuum
fun:lazy_scan_heap
fun:heap_vacuum_rel
fun:table_relation_vacuum
fun:vacuum_rel
fun:vacuum
fun:ExecVacuum
fun:standard_ProcessUtility
fun:ProcessUtility
fun:PortalRunUtility
fun:PortalRunMulti
}
==152

[1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2025-02-14%2018%3A00%3A12

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Nathan Bossart 2025-02-14 18:58:46 pgsql: Use PqMsg_Progress macro in HandleParallelMessage().
Previous Message Melanie Plageman 2025-02-14 17:59:17 pgsql: Use streaming read I/O in VACUUM's first phase