대량 이관 작업시 대상 테이블 autovacuum 끄기

 

select 'alter table '||table_schema||'.'||table_name||' set (autovacuum_enabled=false);'
from information_schema.tables
where table_schema = '스키마명'

 and table_name = '테이블명'

;

 

다시 켜는건

 

select 'alter table '||table_schema||'.'||table_name||' set (autovacuum_enabled=true);' 
from information_schema.tables 
where table_schema = '스키마명'

 and table_name = '테이블명'

;

'DataBase > Postgresql' 카테고리의 다른 글

테이블 사이즈 확인  (0) 2019.08.13
role에 속한 계정 조회  (0) 2019.08.13
Postgresql 테이블 정보, 컬럼 정보 조회  (0) 2017.11.23
postgresql 한글정렬  (0) 2017.10.12
postgresql.conf 간단설정  (0) 2017.10.12

+ Recent posts