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
CREATE INDEX CONCURRENTLY cannot be executed within a pipeline #3806
Comments
Thanks for the issue report and the question to the postgresql mailing list. I've not looked much into postgresql's pipeline mode, it's not something we're explicitly enabling. We normally run in a transaction but it looks like you are already explicitly disabling it which would have been my first question. So thanks for thinking of that. If you run those series of commands through some other tool, they all run successfully I assume? |
yes, if run it manually in the psql -> all good. |
@thamerlan @nvoxland a bit of information from the other project: we have exactly same problem with DbUp#680 after upgrading PostgreSQL to 14.7 and 11.19 in the last few days (versions below 14.6 and 11.18 are unaffected). Whatever is causing the problem seems to be introduced in last updates. So @thamerlan you may want to go over again to postgrespro for consultations, let me know if you need any specifics from DbUp. For your reference, error and call Stack are below. Can be reproduced with any
|
We too started to face similar issue with latest pg versions (13.10, 14.7, 15.7) . As of now downgraded pg to previous version to move ahead. |
If the code uses |
Problem also appears in postgres version 13.10 Might also be caused by a compound sql statement, e.g. |
Hello @thamerlan, I've tested this with liquibase version 4.23.0 and I was able to replicate the issue. This PR is a workaround for this issue, as is putting the I'll be closing this ticket, though be sure to comment if the issue persists. |
Environment
Liquibase Version: 4.19.0, 4.1.1, 3.5.3
Liquibase Integration & Version: CLI
Liquibase Extension(s) & Version: N/A
Database Vendor & Version: PostgreSQL 14.7
Operating System Type & Version: Ubuntu 18.04.6 LTS
Infrastructure Type/Provider: Ubuntu 18.04.6 LTS Docker Image
Description
After upgrade of PostgreSQL to the latest minor version: 14.7 migration with "CREATE INDEX CONCURRENTLY" failing with:
Starting Liquibase at 14:20:53 (version 4.1.1 DbUp/DbUp#10 built at 2020-10-12 19:24+0000) Unexpected error running Liquibase: Migration failed for change set .../changelog.sql::2021-12-10-... Reason: liquibase.exception.DatabaseException: ERROR: CREATE INDEX CONCURRENTLY cannot be executed within a pipeline [Failed SQL: (0)
Migration example:
Steps To Reproduce
Create SQL migration, like in the example above. With listed headers, function and index build with concurrently.
Try to run on PostgreSQL 14.7.
Actual Behavior
Exception. See above.
Expected/Desired Behavior
Execution without exception.
Additional Context
See PostgreSQL expert answer here.
The text was updated successfully, but these errors were encountered: