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

Look into lock_timeout #16

Closed
shayonj opened this issue Jan 30, 2022 · 3 comments · Fixed by #23
Closed

Look into lock_timeout #16

shayonj opened this issue Jan 30, 2022 · 3 comments · Fixed by #23
Labels
enhancement New feature or request p1

Comments

@shayonj
Copy link
Owner

shayonj commented Jan 30, 2022

During the swap, we will need to be knowledgeable of any other long queries happening against the primary table. In which case, should we set a lock_timeout and cancel other queries?

Is there a better experience? -

  • maybe wait for 5 mins and retry upto 3 times before cancelling other queries? (--wait-timeout)
  • or fail hard if pgosc couldn't acquire a lock for the swap perhaps? (continue replaying during this time).
    • If failing hard, then pgosc should do the cleanup.
    • Introducing a flag to convey user preference is also possible
    • Similar to pg_repack? (re-purposing the lessons?) (combination of --no-kill-backend and --wait-timeout)
@shayonj shayonj added enhancement New feature or request p1 labels Jan 30, 2022
@shayonj
Copy link
Owner Author

shayonj commented Jan 30, 2022

There's few different paths, gonna think a bit more. @jfrost (if you fancy a brainstorm), I'd be curious for your thoughts (no rush ofc) 🙏🏾 .

@jfrost
Copy link
Collaborator

jfrost commented Jan 31, 2022

I vote for the third option.

@shayonj
Copy link
Owner Author

shayonj commented Feb 7, 2022

I have the approach described here - #23

Lmk if you anticipate any concerns, early stress tests came positive 🙌🏾

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request p1
Projects
None yet
2 participants