-
Notifications
You must be signed in to change notification settings - Fork 895
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
[Bug]: delete_job() deadlocks #6152
Comments
Hi @leppaott , We have encountered something similar but with compression jobs. Have you considered using pg_advisory_xact_lock?
This will basically prevent any concurrency on this operation. Probably add this around all job-altering operations. |
hi @leppaott , thank you for reaching out. I’m guessing that relation 17290 is |
@konskov there you were right, is there a query to print processes involved or is that good enough? But telemetry might be involved, I got this reproduced locally (repeated runs though) after I took the same CI image in use which has telemetry. Now trying Edit: don't see the issue anymore when not trying to delete telemetry jobs & running with @melicheradam thanks for the suggestion, we'll try that if needed. |
Thanks @melicheradam indeed, this seems to work as expected. After updating |
What type of bug is this?
Locking issue
What subsystems and features are affected?
Other
What happened?
Hello we have following code on e2e tests trying to remove retention jobs before a test suite. Each test suite loads the extension and creates retention jobs on the same postgres instance. This is to prevent some retention jobs from deleting items during tests.
However sometimes rarely we get a deadlock detected (see output) thought I'd report this. Any idea of a better solution/workaround?
TimescaleDB version affected
2.11.0
PostgreSQL version used
15.3
What operating system did you use?
Debian/Docker
What installation method did you use?
Docker
What platform did you run on?
Other, Not applicable
Relevant log output and stack trace
How can we reproduce the bug?
The text was updated successfully, but these errors were encountered: