public inbox for [email protected]
help / color / mirror / Atom feedFrom: Lakshmi N <[email protected]>
To: Kirill Reshke <[email protected]>
Cc: [email protected]
Subject: Re: Add missing CHECK_FOR_INTERRUPTS calls in dblink module
Date: Sun, 15 Mar 2026 11:22:16 -0700
Message-ID: <CA+3i_M9ySDQ4WbEiPC5qxzi30mkaLbK+dbDOxYTSqRR3fGWZ1g@mail.gmail.com> (raw)
In-Reply-To: <CALdSSPhuCN_cS7MXobWx7Lh0adc-NWd8M115QMGC+yf21kCgNg@mail.gmail.com>
References: <CA+3i_M-fFb4cZ4SYToBft5VERvo0AZ22LRfzLE5axpGr9YsgPg@mail.gmail.com>
<CALdSSPhuCN_cS7MXobWx7Lh0adc-NWd8M115QMGC+yf21kCgNg@mail.gmail.com>
Hi Kirill,
Apologies for the delay in responding.
On Tue, Mar 10, 2026 at 2:25 AM Kirill Reshke <[email protected]>
wrote:
>
> Hi!
> Are you trying to fix any real problem? So, do you have any reproduces
> where dblink stucks while processing tuples? I am somehow surprised if
> we do not have CFI somewhere inside tuplestore_puttuple...
>
This can be reproduced when iteration over millions of tuples, particularly
when the tuples spill to a temp file on disk.
I added pg_usleep(1000L) before the end of the loop to have a
predictable repro, which looks like no CFI in tuplestore_puttuple.
Tested with the below queries to verify the behavior (which should trigger
temp IO).
SET work_mem = '64kB';
SELECT dblink_connect('myconn', 'dbname=' || current_database());
SELECT dblink_open('myconn', 'mycursor', 'SELECT i, repeat(''x'', 1024)
FROM generate_series(1, 100000) i');
explain analyze SELECT * FROM dblink_fetch('myconn', 'mycursor', 100000) AS
t(i int, pad text);
SELECT dblink_close('myconn', 'mycursor');
SELECT dblink_disconnect('myconn');
RESET work_mem;
Regards,
Lakshmi
view thread (3+ messages)
reply
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Add missing CHECK_FOR_INTERRUPTS calls in dblink module
In-Reply-To: <CA+3i_M9ySDQ4WbEiPC5qxzi30mkaLbK+dbDOxYTSqRR3fGWZ1g@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox