다음 매개 변수는 PostgreSQL 소스 코드에서 사용할 수 있으며 경우에 따라 심각한 데이터베이스 손상을 복구하는 데에도 도움이 된다.
실제 운영 중인 데이터베이스에서 이 매개 변수를 사용할 이유는 없다.
따라서 postgresql.conf
샘플 파일에서는 제외되었다.
이러한 매개 변수 다수는 어쨌든 제대로 작동하려면 특수한 소스 컴파일 플래그가 필요하다.
allow_system_table_mods
(boolean
)
Allows modification of the structure of system tables as well as certain other risky actions on system tables. This is otherwise not allowed even for superusers. Ill-advised use of this setting can cause irretrievable data loss or seriously corrupt the database system. Only superusers can change this setting.
backtrace_functions
(string
)
This parameter contains a comma-separated list of C function names. If an error is raised and the name of the internal C function where the error happens matches a value in the list, then a backtrace is written to the server log together with the error message. This can be used to debug specific areas of the source code.
Backtrace support is not available on all platforms, and the quality of the backtraces depends on compilation options.
This parameter can only be set by superusers.
ignore_system_indexes
(boolean
)
시스템 테이블을 읽을 때 시스템 인덱스를 무시한다(그러나, 테이블을 수정하면 인덱스는 계속 수정된다). 이것은 손상된 시스템 인덱스를 복구할 때 유용하다. 이 매개 변수는 세션 시작 후에는 변경할 수 없다.
post_auth_delay
(integer
)
인증 절차를 수행한 후 새 서버 프로세스가 시작 된 후 이 시간 만큼의 기다렸다가 계속한다. 이것은 개발자가 디버거를 사용하여 서버 프로세스에 접속할 수 있는 기회를 제공하기 위한 것이다. 설정값에 단위가 없으면, 초로 간주한다. 기본값은 0 이며, 이는 이 지연이 없음을 뜻한다. 이 매개 변수는 세션 시작 후에는 변경할 수 없다.
pre_auth_delay
(integer
)
인증 절차를 수행하기 전 새 서버 프로세스가 시작된 직후 이 시간만큼의
지연이 발생한다.
이것은 개발자가 디버거를 사용하여 인증 오류를 추적할 수 있도록 서버 프로세스에 접속할 수 있는 기회를 제공하기 위한 것이다.
설정값에 단위가 없으면, 초로 간주한다.
기본값은 0 이며, 이는 이 지연이 없음을 뜻한다.
이 매개 변수는 postgresql.conf
파일 또는 서버 커맨드 라인에서만 설정 가능하다.
trace_notify
(boolean
)
LISTEN
및 NOTIFY
명령에 대한 대량의 디버깅 출력을 생성한다.
이 출력을 클라이언트 또는 서버 로그에 각각 전송하려면 client_min_messages 또는 log_min_messages는 DEBUG1
이어야 한다.
trace_recovery_messages
(enum
)
복구 관련 디버깅 출력의 로깅을 활성화한다. 그 외에는 로깅되지 않는다.
이 매개 변수는 사용자가 log_min_messages의 일반 설정을 오버라이드할 수 있지만, 특정 메시지에만 해당된다.
이것은 핫 스탠바이에서 사용된다. 유효 값은 DEBUG5
및 DEBUG4
,
DEBUG3
, DEBUG2
, DEBUG1
, LOG
이다.
기본적으로, LOG
는 로깅 결정에 전혀 영향을 주지 않는다.
다른 값들은 LOG
우선 순위가 있어도 해당 우선 순위보다 높은 복구 관련 디버그 메시지를 발생시킨다.
log_min_messages
의 공통 설정의 경우 이것은 서버 로그로 무조건 메시지를 전송한다.
이 매개 변수는 postgresql.conf
파일 또는 서버 커맨드 라인에서만 설정 가능하다.
trace_sort
(boolean
)
on으로 설정된 경우 정렬 명령 중에 리소스 사용량에 대한 정보를 출력한다.
이것은 PostgreSQL이 컴파일된 경우 TRACE_SORT
매크로가 정의된 경우에만 사용할 수 있다.
(단, TRACE_SORT
는 현재 기본적으로 정의된다.)
trace_locks
(boolean
)
on으로 설정된 경우 정렬 명령 중에 잠금 사용에 대한 정보를 출력한다. 덤프된 정보에는 잠금 명령, 잠금 유형 및 잠금 또는 잠금 해제된 개체의 고유 식별자가 포함된다. 이 개체에 이미 부여된 잠금 유형 및 이 개체를 기다리는 잠금 유형에 대한 비트 마스크도 포함된다. 각 잠금 유형의 경우 부여된 잠금 및 대기 중인 잠금 수에 대한 카운트 및 총계도 덤프된다. 로그 파일 출력에 대한 예제는 다음과 같다.
LOG:LockAcquire: new: lock(0xb7acd844) id(24688,24696,0,0,0,1) grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0 wait(0) type(AccessShareLock) LOG:GrantLock: lock(0xb7acd844) id(24688,24696,0,0,0,1) grantMask(2) req(1,0,0,0,0,0,0)=1 grant(1,0,0,0,0,0,0)=1 wait(0) type(AccessShareLock) LOG:UnGrantLock: updated: lock(0xb7acd844) id(24688,24696,0,0,0,1) grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0 wait(0) type(AccessShareLock) LOG:CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1) grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0 wait(0) type(INVALID)
덤프되는 구조에 대한 자세한 내용은 src/include/storage/lock.h
에서 찾을 수 있다.
이것은 PostgreSQL이 컴파일된 경우 LOCK_DEBUG
매크로가 정의된 경우에만 사용할 수 있다.
trace_lwlocks
(boolean
)
on으로 설정된 경우 정렬 명령 중에 가벼운 잠금(lightweight lock) 사용에 대한 정보를 출력한다. 가벼운 잠금(lightweight lock)은 주로 공유 메모리 데이터 구조에 대한 상호 배제 액세스를 제공하기 위함이다.
이것은 PostgreSQL이 컴파일된 경우 LOCK_DEBUG
매크로가 정의된 경우에만 사용할 수 있다.
trace_userlocks
(boolean
)
on으로 설정된 경우 정렬 명령 중에 사용자 잠금(user lock) 사용에 대한 정보를 출력한다.
보조 잠금(advisory locks)인 경우에만 출력이 trace_locks
와 동일하다.
이것은 PostgreSQL이 컴파일된 경우 LOCK_DEBUG
매크로가 정의된 경우에만 사용할 수 있다.
trace_lock_oidmin
(integer
)
설정된 경우 이 OID 아래 테이블에 대해 잠금을 추적하지 않는다. (시스템 테이블에 출력을 방지하려고 사용되었음)
이것은 PostgreSQL이 컴파일된 경우 LOCK_DEBUG
매크로가 정의된 경우에만 사용할 수 있다.
trace_lock_table
(integer
)
이 테이블(OID)에 대한 잠금을 무조건 추적한다. Unconditionally trace locks on this table (OID).
이것은 PostgreSQL이 컴파일된 경우 LOCK_DEBUG
매크로가 정의된 경우에만 사용할 수 있다.
debug_deadlocks
(boolean
)
설정된 경우 데드락 타임아웃 발생 시 현재 모든 잠금에 대한 정보를 덤프한다.
이것은 PostgreSQL이 컴파일된 경우 LOCK_DEBUG
매크로가 정의된 경우에만 사용할 수 있다.
log_btree_build_stats
(boolean
)
설정된 경우 다양한 B-트리 명령에서 시스템 리소스 사용량 통계(메모리 및 CPU)를 로깅한다.
이것은 PostgreSQL이 컴파일된 경우 BTREE_BUILD_STATS
매크로가 정의된 경우에만 사용할 수 있다.
wal_consistency_checking
(string
)
This parameter is intended to be used to check for bugs in the WAL redo routines. When enabled, full-page images of any buffers modified in conjunction with the WAL record are added to the record. If the record is subsequently replayed, the system will first apply each record and then test whether the buffers modified by the record match the stored images. In certain cases (such as hint bits), minor variations are acceptable, and will be ignored. Any unexpected differences will result in a fatal error, terminating recovery.
The default value of this setting is the empty string, which disables
the feature. It can be set to all
to check all
records, or to a comma-separated list of resource managers to check
only records originating from those resource managers. Currently,
the supported resource managers are heap
,
heap2
, btree
, hash
,
gin
, gist
, sequence
,
spgist
, brin
, and generic
. Only
superusers can change this setting.
wal_debug
(boolean
)
설정된 경우 WAL 관련 디버깅 출력을 내보낸다.
이것은 PostgreSQL이 컴파일된 경우 WAL_DEBUG
매크로가 정의된 경우에만 사용할 수 있다.
ignore_checksum_failure
(boolean
)
data checksums가 활성화된 경우에만 효과가 있다.
읽기 중 체크섬 실패를 감지하면 PostgreSQL이 에러를 보고하고, 현재 트랜잭션을 중단한다.
ignore_checksum_failure
를 on으로 설정하면 시스템이 실패(그래도 경고는 리포트된다)를 무시하고 프로세싱을 계속한다.
이러한 동작은 충돌, 충돌 전파나 숨김 또는 기타 심각한 문제를 초래한다. 그러나, 블록 헤더가 온전한 경우에는 이것을 사용하면 에러를 무시하고 테이블에 잔존해 있을 수 있는 미손상 튜플을 검색할 수 있다.
블록 헤더가 손상된 경우 이 옵션이 활성화된 경우에도 에러가 보고된다. 기본값은 off
이고 슈퍼유저에 의해서만 변경 가능하다.
zero_damaged_pages
(boolean
)
손상된 페이지 헤더가 감지되면 PostgreSQL이 에러를 보고하고 현재 트랜잭션을 중단한다.
zero_damaged_pages
를 on으로 설정하면 시스템이 대신 경고를 보고하고, 메모리에서 손상된 페이지를 0으로 처리하고, 프로세싱을 계속한다. 이러한 작업은 손상된 페이지의 모든 행, 즉 데이터를 소멸시킨다.
그러나, 이것을 이용하면 사용자는 에러를 무시하고 테이블에 잔존해 있을 수 있는 미손상 페이지에서 행을 검색할 수 있다. 이것은 하드웨어 또는 소프트웨어 에러에 의한 손상이 발생된 경우 데이터를 복구할 때 유용하다.
테이블의 손상된 페이지에서 데이터를 복구하지 않기로 결정하기 전에는 이것을 on으로 설정하면 안 된다.
0으로 처리된 페이지는 디스크에 강제로 쓰여지지 않으므로 이 매개 변수를 off로 다시 설정하기 전에 테이블 또는 인덱스를 재생하는 것이 좋다.
기본값은 off
이고 슈퍼유저에 의해서만 변경 가능하다.
ignore_invalid_pages
(boolean
)
If set to off
(the default), detection of
WAL records having references to invalid pages during
recovery causes PostgreSQL to
raise a PANIC-level error, aborting the recovery. Setting
ignore_invalid_pages
to on
causes the system to ignore invalid page references in WAL records
(but still report a warning), and continue the recovery.
This behavior may cause crashes, data loss,
propagate or hide corruption, or other serious problems.
However, it may allow you to get past the PANIC-level error,
to finish the recovery, and to cause the server to start up.
The parameter can only be set at server start. It only has effect
during recovery or in standby mode.
jit_debugging_support
(boolean
)
If LLVM has the required functionality, register generated functions
with GDB. This makes debugging easier.
The default setting is off
.
This parameter can only be set at server start.
jit_dump_bitcode
(boolean
)
Writes the generated LLVM IR out to the
file system, inside data_directory. This is only
useful for working on the internals of the JIT implementation.
The default setting is off
.
This parameter can only be changed by a superuser.
jit_expressions
(boolean
)
Determines whether expressions are JIT compiled, when JIT compilation
is activated (see 31.2절). The default is
on
.
jit_profiling_support
(boolean
)
If LLVM has the required functionality, emit the data needed to allow
perf to profile functions generated by JIT.
This writes out files to $HOME/.debug/jit/
; the
user is responsible for performing cleanup when desired.
The default setting is off
.
This parameter can only be set at server start.
jit_tuple_deforming
(boolean
)
Determines whether tuple deforming is JIT compiled, when JIT
compilation is activated (see 31.2절).
The default is on
.