=?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