"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Tuesday, November 4, 2025, PG Bug reporting form <noreply@postgresql.org>
> wrote:
>> Thanks for reading my report. Here, I find a performance issue. I have
>> found a performance issue where a canceled INSERT statement appears to
>> negatively impact the performance of subsequent SELECT queries.
> This doesn’t feel like a bug.
It is not. The reason ROLLBACK is essentially free in Postgres
is that some of the ensuing cleanup work gets done during
subsequent table accesses. Some other DBMSes do that differently,
but that's our choice and we're not likely to revisit it.
> Temporary tables are nice for this kind of flow. Don’t touch production
> tables until you know what you are going to insert is going to stick.
Yeah. Frequently rolling back large data modifications is a
performance anti-pattern no matter what the underlying implementation
does.
regards, tom lane