Re: [PERFORMANCE] regression: EXECUTE loop TRUNCATE slower in 17.5 vs 17.2 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [PERFORMANCE] regression: EXECUTE loop TRUNCATE slower in 17.5 vs 17.2
Date
Msg-id 1208551.1753229335@sss.pgh.pa.us
Whole thread Raw
In response to [PERFORMANCE] regression: EXECUTE loop TRUNCATE slower in 17.5 vs 17.2  (Guilherme Luis França <gulybyte@gmail.com>)
List pgsql-bugs
=?UTF-8?Q?Guilherme_Luis_Fran=C3=A7a?= <gulybyte@gmail.com> writes:
> I noticed a performance regression after upgrading my test environment from
> `postgres:17.2-alpine` to `postgres:17.5-alpine`. My test suite slowed down
> significantly. After investigation, I narrowed it down to the way I reset
> the database beforeEachTest.
> The issue appears when using a PL/pgSQL `DO` block with dynamic `EXECUTE`
> to truncate all tables in a loop.

Hmm ... this test case runs in under 50ms for me, in a vanilla 17.5
setup.  So even your older timing seems pretty slow from here.
I speculate that you have some replication setup that you didn't
describe and that the extra time is disappearing into that somehow.

I agree that there's probably some unintended regression here,
but it's hard to say what unless we can duplicate it.  If you
can't put your finger on what about your setup tickles the
problem, maybe you could "git bisect" to discover where the
behavior changed?

            regards, tom lane



pgsql-bugs by date:

Previous
From: Guilherme Luis França
Date:
Subject: [PERFORMANCE] regression: EXECUTE loop TRUNCATE slower in 17.5 vs 17.2
Next
From: Michael Paquier
Date:
Subject: Re: BUG #18992: Autovacuum triggering assert - LWLockAnyHeldByMe