설문조사
PostgreSQL/PPAS 관련 듣고 싶은 교육은


총 게시물 73건, 최근 0 건
   

ACCESSSHARELOCK

글쓴이 : PostgresDBA 날짜 : 2014-02-05 (수) 17:59 조회 : 7060
오라클은 SELECT 동안 락을 잡지 않습니다.
다만, SELECT 되는 동안 해당 테이블의 구조(컬럼변경, DDL 등) 를 바꾸지 못하도록 해당 테이블에 TM LOCK 을 겁니다.
성능에 지장을 주는 LOCK 은 아니랍니다.

오라클의 이 TM LOCK 에 해당하는 LOCK 이 PostgreSQL 에서는  AccessShareLock 이랍니다.
그래서, PostgreSQL에서 이 AccessShareLock 이 많이 보여도 걱정안하셔도 됩니다.


SELECT command acquires a lock of this mode on referenced
tables. In general, any query that only reads a table and does not
modify it will acquire this lock mode.
"""
in other words, everything is ok, AccessShareLock doesn't block
anything but with anyone trying to change the structure of the table
(ALTER, DROP) and with commands TRUNCATE, REINDEX, CLUSTER, and VACUUM
FULL, and every select take it

   

postgresdba.com