Created
March 26, 2021 09:33
-
-
Save munya/e39cf47ae43dc2494997f5aa39a86739 to your computer and use it in GitHub Desktop.
Alter table with lock table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BEGIN; | |
| SET statement_timeout = 50; | |
| LOCK TABLE ONLY test IN ACCESS EXCLUSIVE MODE; | |
| SET statement_timeout = 0; | |
| ALTER TABLE test ....; | |
| -- do whatever you want, timeout is removed. | |
| commit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment