This article is half-done without your Comment! *** Please share your thoughts via Comment ***
I already wrote an article on it. Please check the below article.
PostgreSQL: How to apply ACCESS EXCLUSIVE LOCK MODE on Table?
But still, one of the junior developers confuse with this because instead of ACCESS EXCLUSIVE LOCK, he needed only SHARE MODE.
Already mentioned the list of MODEs, we have just to change the LOCK TABLE line.
SHARE Mode:
Now, another user can only SELECT the table.
1 |
LOCK TABLE tbl_Employee IN SHARE MODE; |
Leave a Reply