본문으로 건너뛰기

temp_tablespaces

버전기본값context타입
14an empty stringuserstring
15an empty stringuserstring
16an empty stringuserstring
17an empty stringuserstring
18an empty stringuserstring
19an empty stringuserstring

CREATE 명령이 tablespace를 명시하지 않았을 때 임시 객체(임시 테이블과 그 인덱스)를 만들 tablespace를 정한다. 대량 정렬 같은 작업에 쓰이는 임시 파일도 여기에 만들어진다.

값은 tablespace 이름 목록이다. 목록에 이름이 여러 개면 PostgreSQL이 임시 객체를 만들 때마다 무작위로 하나를 고르는데, 한 transaction 안에서 연속으로 만들어지는 임시 객체는 목록의 tablespace를 차례로 사용한다. 선택된 항목이 빈 문자열이면 현재 데이터베이스의 기본 tablespace를 대신 사용한다.

세션에서 직접 설정할 때는 존재하지 않는 tablespace나 CREATE 권한이 없는 tablespace를 지정하면 에러가 난다. 그러나 postgresql.conf에 적어 둔 값처럼 미리 설정된 값을 사용할 때는 그런 tablespace를 조용히 무시한다. 기본값은 빈 문자열로, 모든 임시 객체가 현재 데이터베이스의 기본 tablespace에 만들어진다. default_tablespace도 함께 참고한다.

출처: PostgreSQL 18 문서