Re: BUG #19103: Canceled INSERT statement can still influence the performance of subsequent SELECT statement

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #19103: Canceled INSERT statement can still influence the performance of subsequent SELECT statement
Дата
Msg-id 517270.1762268128@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #19103: Canceled INSERT statement can still influence the performance of subsequent SELECT statement  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs
"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



В списке pgsql-bugs по дате отправления: