티스토리 뷰
반응형
postgresql에서 대량 이관 작업시 auto vacuum이 켜져 있으면 이관중에 vacuum이 실행되는 문제가 발생하여 이관이 오래 걸림.
대상 테이블 autovacuum 끄기
select 'alter table '||table_schema||'.'||table_name||' set (autovacuum_enabled=false);'
from information_schema.tables
where table_schema = '스키마명'
and table_name = '테이블명'
;
대상 테이블 autovacuum 다시 켜기
select 'alter table '||table_schema||'.'||table_name||' set (autovacuum_enabled=true);'
from information_schema.tables
where table_schema = '스키마명'
and table_name = '테이블명'
;
반응형
'DataBase > Postgresql' 카테고리의 다른 글
postgresql 파티션 테이블 생성 및 데이터 이관 (0) | 2024.05.09 |
---|---|
테이블 사이즈 확인 (0) | 2019.08.13 |
role에 속한 계정 조회 (0) | 2019.08.13 |
postgresql 한글정렬 (0) | 2017.10.12 |
postgresql.conf 간단설정 (0) | 2017.10.12 |
반응형
최근에 올라온 글
- Total
- Today
- Yesterday
TAG
- 독도
- 투싼
- tablespace
- index
- recovery
- SQLPlus
- 오라클
- postgresql pg_stat_activity
- PostgreSQL
- postgresql jsonb
- 한글
- 아이폰
- postgresql jsonb index
- 갤럭시S
- iPhone
- 출시일
- MS-SQL
- linux
- iOS5
- Managing Schema Objects
- query 잘림
- oracle
- PL/SQL
- 아이폰4
- parameter
- 리눅스
- 윈도우
- 인덱스
- Flashback
- Backup
글 보관함