Re: Memoize ANTI and SEMI JOIN inner - Mailing list pgsql-hackers

From Richard Guo
Subject Re: Memoize ANTI and SEMI JOIN inner
Date
Msg-id CAMbWs48g0Q_mWJip_dDEcgaCHZw71MRB=pkz4B6PzWyfVWWaCA@mail.gmail.com
Whole thread Raw
In response to Re: Memoize ANTI and SEMI JOIN inner  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Tue, May 13, 2025 at 10:51 PM Andres Freund <andres@anarazel.de> wrote:
> This is failing on CI:
> https://cirrus-ci.com/github/postgresql-cfbot/postgresql/cf%2F5636
> https://api.cirrus-ci.com/v1/artifact/task/5411026402803712/testrun/build-32/testrun/regress/regress/regression.diffs
>
> diff -U3 /tmp/cirrus-ci-build/src/test/regress/expected/memoize.out
/tmp/cirrus-ci-build/build-32/testrun/regress/regress/results/memoize.out
> --- /tmp/cirrus-ci-build/src/test/regress/expected/memoize.out  2025-04-12 11:24:10.866868945 +0000
> +++ /tmp/cirrus-ci-build/build-32/testrun/regress/regress/results/memoize.out   2025-04-12 11:32:44.454864476 +0000
> @@ -525,7 +525,7 @@
>                       ->  Unique (actual rows=2.67 loops=N)
>                             ->  Sort (actual rows=67.33 loops=N)
>                                   Sort Key: t2_1.a
> -                                 Sort Method: quicksort  Memory: 27kB
> +                                 Sort Method: quicksort  Memory: 18kB
>                                   ->  Seq Scan on tab_anti t2_1 (actual rows=100.00 loops=N)
>  (15 rows)
>
>
> There shouldn't be Memory mentioned in tests added to the tree.

Thanks for pointing this out.  You're right — Memory usage should be
hidden from the output of EXPLAIN ANALYZE.  I'm a bit surprised the
existing explain_memoize function doesn't already handle that; I
guess it's because the plans in memoize.sql don't currently include
any Sort nodes.  In any case, I've added a regexp_replace to filter
out 'Memory: \d+kB' in explain_memoize.

Thanks
Richard

Attachment

pgsql-hackers by date:

Previous
From: Richard Guo
Date:
Subject: Re: Add explicit initialization for all PlannerGlobal fields
Next
From: Nisha Moond
Date:
Subject: Re: Logical Replication of sequences