From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: jinhui.lai@qq.com
Subject: BUG #19103: Canceled INSERT statement can still influence the performance of subsequent SELECT statement
Date: Tue, 04 Nov 2025 12:08:00 +0000
Message-ID: <19103-0e4f007453331d2b@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 19103
Logged by: Jinhui Lai
Email address: jinhui.lai@qq.com
PostgreSQL version: 18.0
Operating system: ubuntu 22.04
Description:
Dear PG developers:
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.
Steps to Reproduce:
\timing on
CREATE TABLE t0(c0 INT8);
INSERT INTO t1 VALUES(1);
CREATE TABLE t1(c1 INT8);
INSERT INTO t1 SELECT * FROM generate_series(1, 100000000);
^CCancel request sent
ERROR: canceling statement due to user request
Time: 50685.063 ms (00:50.685)
SELECT COUNT(*) FROM t0;
count
-------
0
(1 row)
Time: 1.264 ms
SELECT COUNT(*) FROM t1;
count
-------
0
(1 row)
Time: 3466.933 ms (00:03.467)
This performance degradation could affect systems where large batch
operations are frequently started and canceled, potentially impacting
overall database responsiveness.
Thank you for investigating this issue.
Best regards,
Jinhui Lai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, jinhui.lai@qq.com
Subject: Re: BUG #19103: Canceled INSERT statement can still influence the performance of subsequent SELECT statement
In-Reply-To: <19103-0e4f007453331d2b@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox