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


총 게시물 73건, 최근 0 건
   

pgpool-II 과 session kill

글쓴이 : PostgresDBA 날짜 : 2016-06-17 (금) 10:16 조회 : 6084
요즘 pgpool 를 가지고 심화학습(?)을 하고 있는중인데. 이런문제가 있네요.

오라클db 경우 락이 발생하거나 하면 쉽게 세션을 kill 하곤 하죠.

PostgreSQL/EPAS 도 락 발생시 pg_terminate_backend 함수를 이용해서 락유발 세션을 kill 할수 있습니다.

이때 주의 할점이 PgPool 을 이용해서 맺혀진 세션 같은 경우는 pg_terminate_backend 로 세션을 킬할시에 PgPool 프로세스 전부가 죽어버립니다. 주의하세요!!!!
메일링리스트 답변을 보면 pg_cancel_backend 로 쿼리를 취소하라고 하네요 --; 

매뉴얼에도 아래와 같이 나와 있네요.

If you use pg_terminate_backend() to stop a backend, this will trigger a failover. The reason why this happens is that PostgreSQL sends exactly the same message for a terminated backend as for a full postmaster shutdown. There is no workaround as of today. Please do not use this function.

   

postgresdba.com