본문 바로가기
Data/PostgreSQL

[PostgreSQL] Publication, Replication_slot 조회 및 삭제

by dev_ss 2024. 4. 23.

 

 

 

PostgreSQL에서 데이터베이스 복제를 할 때 사용되는 Publication과 Replication_slot의 조회와 삭제와 관련된 명령어이다.

 

 

 

1. Publication 조회 및 삭제

 

-- psql

-- 모든 publication 조회
select * from pg_publication;


-- publication과 관련된 모든 테이블 조회
select * from pg_publication_tables;


-- publication 삭제
drop publication <publication 이름>;

 

 

 

 

2. Replication_slot 조회 및 삭제

 

-- psql


-- 모든 replication_slot 조회
select * from pg_replication_slots;


-- replication_slot 삭제
select pg_drop_replication_slot(<Replication_slot 이름>);

 

 

 

 

 

 

반응형

'Data > PostgreSQL' 카테고리의 다른 글

[PostgreSQL] Replication Slot  (0) 2024.02.16