-
Notifications
You must be signed in to change notification settings - Fork 176
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
different type of locks for index operations? #134
Comments
perhaps I'm forgetting that both need a brief exclusive lock to get the index into the catalog and get the process started? The docs don't seem to mention this. But some blog posts maybe do? |
Hey @jjb, can you add the relevant parts of the discussion to this issue? From my understanding, it should be okay to wait longer for locks that don't block reads or writes, but I'm not sure it's worth the extra complexity (and I'm not sure there's a simple way to do it with PgBouncer). |
Thanks for your response. Let me first figure out what type of locks are actually needed and then I'll see if I have something valuable to propose. https://dba.stackexchange.com/questions/280284/what-type-of-locks-are-needed-when-creating-a-postgres-index-concurrently |
Okay, @Melkij came in with an epic answer to that question. concurrent index build acquires ShareUpdateExclusiveLock, which will not cause queries to wait. Not sure if this is a good reason to change strong_migrations behavior or not. |
Hey @jjb, thanks for the update. We could add a |
ok |
The warning about locks is fantastic and the recent discussion about doing retries is really cool!
I'm wondering if the lock timeout situation is different for indexes than it is for other operations.
PG slack discussion: https://postgresteam.slack.com/archives/C0FS3UTAP/p1604344392130600
The text was updated successfully, but these errors were encountered: