Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
PostgreSQL 9.4.1 Documentation
PrevUpChapter 18. Server ConfigurationNext

18.17. Developer Options

The following parameters are intended for work on thePostgreSQL source code, and in some cases to assist with recovery of severely damaged databases. There should be no reason to use them on a production database. As such, they have been excluded from the samplepostgresql.conf file. Note that many of these parameters require special source compilation flags to work at all.

allow_system_table_mods (boolean)

Allows modification of the structure of system tables. This is used byinitdb. This parameter can only be set at server start.

debug_assertions (boolean)

Turns on various assertion checks. This is a debugging aid. If you are experiencing strange problems or crashes you might want to turn this on, as it might expose programming mistakes. To use this parameter, the macroUSE_ASSERT_CHECKING must be defined whenPostgreSQL is built (accomplished by theconfigure option--enable-cassert). Note thatdebug_assertions defaults toon ifPostgreSQL has been built with assertions enabled.

ignore_system_indexes (boolean)

Ignore system indexes when reading system tables (but still update the indexes when modifying the tables). This is useful when recovering from damaged system indexes. This parameter cannot be changed after session start.

post_auth_delay (integer)

If nonzero, a delay of this many seconds occurs when a new server process is started, after it conducts the authentication procedure. This is intended to give developers an opportunity to attach to the server process with a debugger. This parameter cannot be changed after session start.

pre_auth_delay (integer)

If nonzero, a delay of this many seconds occurs just after a new server process is forked, before it conducts the authentication procedure. This is intended to give developers an opportunity to attach to the server process with a debugger to trace down misbehavior in authentication. This parameter can only be set in thepostgresql.conf file or on the server command line.

trace_notify (boolean)

Generates a great amount of debugging output for theLISTEN andNOTIFY commands.client_min_messages orlog_min_messages must beDEBUG1 or lower to send this output to the client or server logs, respectively.

trace_recovery_messages (enum)

Enables logging of recovery-related debugging output that otherwise would not be logged. This parameter allows the user to override the normal setting oflog_min_messages, but only for specific messages. This is intended for use in debugging Hot Standby. Valid values areDEBUG5,DEBUG4,DEBUG3,DEBUG2,DEBUG1, andLOG. The default,LOG, does not affect logging decisions at all. The other values cause recovery-related debug messages of that priority or higher to be logged as though they hadLOG priority; for common settings oflog_min_messages this results in unconditionally sending them to the server log. This parameter can only be set in thepostgresql.conf file or on the server command line.

trace_sort (boolean)

If on, emit information about resource usage during sort operations. This parameter is only available if theTRACE_SORT macro was defined whenPostgreSQL was compiled. (However,TRACE_SORT is currently defined by default.)

trace_locks (boolean)

If on, emit information about lock usage. Information dumped includes the type of lock operation, the type of lock and the unique identifier of the object being locked or unlocked. Also included are bit masks for the lock types already granted on this object as well as for the lock types awaited on this object. For each lock type a count of the number of granted locks and waiting locks is also dumped as well as the totals. An example of the log file output is shown here:

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)

Details of the structure being dumped may be found insrc/include/storage/lock.h.

This parameter is only available if theLOCK_DEBUG macro was defined whenPostgreSQL was compiled.

trace_lwlocks (boolean)

If on, emit information about lightweight lock usage. Lightweight locks are intended primarily to provide mutual exclusion of access to shared-memory data structures.

This parameter is only available if theLOCK_DEBUG macro was defined whenPostgreSQL was compiled.

trace_userlocks (boolean)

If on, emit information about user lock usage. Output is the same as fortrace_locks, only for advisory locks.

This parameter is only available if theLOCK_DEBUG macro was defined whenPostgreSQL was compiled.

trace_lock_oidmin (integer)

If set, do not trace locks for tables below this OID. (use to avoid output on system tables)

This parameter is only available if theLOCK_DEBUG macro was defined whenPostgreSQL was compiled.

trace_lock_table (integer)

Unconditionally trace locks on this table (OID).

This parameter is only available if theLOCK_DEBUG macro was defined whenPostgreSQL was compiled.

debug_deadlocks (boolean)

If set, dumps information about all current locks when a deadlock timeout occurs.

This parameter is only available if theLOCK_DEBUG macro was defined whenPostgreSQL was compiled.

log_btree_build_stats (boolean)

If set, logs system resource usage statistics (memory and CPU) on various B-tree operations.

This parameter is only available if theBTREE_BUILD_STATS macro was defined whenPostgreSQL was compiled.

wal_debug (boolean)

If on, emit WAL-related debugging output. This parameter is only available if theWAL_DEBUG macro was defined whenPostgreSQL was compiled.

ignore_checksum_failure (boolean)

Only has effect ifdata checksums are enabled.

Detection of a checksum failure during a read normally causesPostgreSQL to report an error, aborting the current transaction. Settingignore_checksum_failure to on causes the system to ignore the failure (but still report a warning), and continue processing. This behavior maycause crashes, propagate or hide corruption, or other serious problems. However, it may allow you to get past the error and retrieve undamaged tuples that might still be present in the table if the block header is still sane. If the header is corrupt an error will be reported even if this option is enabled. The default setting isoff, and it can only be changed by a superuser.

zero_damaged_pages (boolean)

Detection of a damaged page header normally causesPostgreSQL to report an error, aborting the current transaction. Settingzero_damaged_pages to on causes the system to instead report a warning, zero out the damaged page in memory, and continue processing. This behaviorwill destroy data, namely all the rows on the damaged page. However, it does allow you to get past the error and retrieve rows from any undamaged pages that might be present in the table. It is useful for recovering data if corruption has occurred due to a hardware or software error. You should generally not set this on until you have given up hope of recovering data from the damaged pages of a table. Zeroed-out pages are not forced to disk so it is recommended to recreate the table or the index before turning this parameter off again. The default setting isoff, and it can only be changed by a superuser.


PrevHomeNext
Customized OptionsUpShort Options
Go to PostgreSQL 9.4
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp