-
Notifications
You must be signed in to change notification settings - Fork 884
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]: Lock condition when trying to create database from a template #4048
Comments
@itroot we are connecting to Note that the template DB to use is
|
@nikkhils You will get the same with
Also, |
I've seen this same thing in our test system once we added timescaledb into the postgresql.conf configuration (postgres 14). It's included in the shared_preload_libraries but not enabled on the database yet. We drop/restore databases in the test harness to get a clean environment, and sometimes get the same crash, and nothing seems to prevent it but the |
Just to chime in that this is still occurring in 2023 (latest docker images), and for our test environment the only mode of configuration available is setting environment variables, however the |
Hello @devanubis, Thanks for reaching out. I was also able to reproduce this behavior with the most recent
|
Running into similar issue. I'm creating a fresh database when running tests from the |
Anybody find a workaround? I'm running into this on DigitalOcean's managed PostgreSQL, where I don't even have superuser to try and kill it. Edit: The workaround I went with was doing |
What type of bug is this?
Locking issue
What subsystems and features are affected?
Background worker
What happened?
I tried to create a database from the template, and instead of that I'm getting an error:
Command that gets an error is:
psql "host=localhost user=postgres password=postgres dbname=postgres port=5432 sslmode=disable" -c 'CREATE DATABASE test_42 WITH template = postgres;'
Notes
Workaround 1
It is possible to make it work via artificial delay in the beginning of the query:
Workaround 2
It works if postgres started with
-c timescaledb.max_background_workers=0
TimescaleDB version affected
2.5.1
PostgreSQL version used
14
What operating system did you use?
Ubuntu 21.04 x64
What installation method did you use?
Docker
What platform did you run on?
Not applicable
Relevant log output and stack trace
How can we reproduce the bug?
The text was updated successfully, but these errors were encountered: