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

Creating indexes on startup of couch2pg causes locks in postgres #193

Closed
witash opened this issue Dec 9, 2024 · 1 comment · Fixed by #194
Closed

Creating indexes on startup of couch2pg causes locks in postgres #193

witash opened this issue Dec 9, 2024 · 1 comment · Fixed by #194
Assignees
Labels
released Type: Bug Fix something that isn't working as intended

Comments

@witash
Copy link
Contributor

witash commented Dec 9, 2024

couch2pg attempts to create the couchdb table and indexes on saved_timestamp and deleted, using IF NOT EXISTS clauses to do nothing if the table and indexes are already created.

For create table if not exists this is fine, however for create index if not exists, postgres acquires a table lock BEFORE checking if the index already exists.
When dbt is running a long query against couch2pg, this means that the couch2pg script hangs.

couch2pg should only attempt to create indexes if the table did not exist

@witash witash added the Type: Bug Fix something that isn't working as intended label Dec 9, 2024
@witash witash self-assigned this Dec 9, 2024
@witash witash moved this from Todo to In Progress in Product Team Activities Dec 9, 2024
witash added a commit that referenced this issue Dec 10, 2024
witash added a commit that referenced this issue Dec 10, 2024
witash added a commit that referenced this issue Dec 11, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Product Team Activities Dec 11, 2024
@medic-ci
Copy link

🎉 This issue has been resolved in version 1.3.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Type: Bug Fix something that isn't working as intended
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants