Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DuckDBQueryOrThrow does not respond to cancel requests #637

Open
2 tasks
cobolbaby opened this issue Feb 28, 2025 · 1 comment
Open
2 tasks

DuckDBQueryOrThrow does not respond to cancel requests #637

cobolbaby opened this issue Feb 28, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@cobolbaby
Copy link

cobolbaby commented Feb 28, 2025

What happens?

When I install the extension in the private network, it hangs for a long time. If I try to use pg_terminate_backend to terminate the execution, It still fails to be canceled.

To Reproduce

Image

OS:

Linux

pg_duckdb Version (if built from source use commit hash):

66cb6e6

Postgres Version (if built from source use commit hash):

16.8

Hardware:

No response

Full Name:

Cobolbaby

Affiliation:

Inventec

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have not tested with any build

Did you include all relevant data sets for reproducing the issue?

No - Other reason (please specify in the issue body)

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configuration (e.g., CPU architecture, Linux distribution) to reproduce the issue?

  • Yes, I have
@JelteF
Copy link
Collaborator

JelteF commented Feb 28, 2025

Okay, so looking at the report, I think the main issue here is that our internal DuckDBQueryOrThrow function does not handle cancel requests (at all). That's indeed something we should fix. I don't consider this super urgent, since we normally don't use DuckDBQueryOrThrow for queries that we expect to take a long time.

An easy way to reproduce this is by using duckdb.raw_query() with some long running query and seeing that pressing Ctrl+C has no effect. For example the following query takes ~18 seconds on my machine to complete and I have no way of canceling it in the middle:

select duckdb.raw_query($$ select count(*) from generate_series(100000000000) $$);

@JelteF JelteF changed the title duckdb.install_extension could not be terminated DuckDBQueryOrThrow does not respond to cancel requests Feb 28, 2025
@JelteF JelteF added the bug Something isn't working label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants