9 CLIENT CONNECTION DEFAULTS

9.1 Statement Behavior

9.1.1 search_path

字符型
默认:search_path = '"$user", public'
当以用户登录数据库时,默认先查找哪些数据库。
"$user"表示同用户名

9.1.2 default_tablespace

字符型
默认:default_tablespace = ''
默认tablespace, ''使用系统默认值

9.1.3 temp_tablespaces

字符型
默认:temp_tablespaces = ''
临时tablespaces列表,''表示使用系统默认值
a list of tablespace names, '' uses only default tablespace

9.1.4 defaulttransactionisolation

字符型
默认:default_transaction_isolation = 'read committed'
数据库的隔离级别有四种,分别是 Read uncommitte、Read committed、Repeatable read、Serializable。

9.1.5 其他

check_function_bodies = on
default_transaction_read_only = off
default_transaction_deferrable = off
session_replication_role = 'origin'
statement_timeout = 0 # in milliseconds, 0 is disabled
lock_timeout = 0 # in milliseconds, 0 is disabled
idle_in_transaction_session_timeout = 0 # in milliseconds, 0 is disabled
vacuum_freeze_min_age = 50000000
vacuum_freeze_table_age = 150000000
vacuum_multixact_freeze_min_age = 5000000
vacuum_multixact_freeze_table_age = 150000000
bytea_output = 'hex' # hex, escape
xmlbinary = 'base64'
xmloption = 'content'
gin_fuzzy_search_limit = 0
gin_pending_list_limit = 4MB

9.2 Locale and Formatting

datestyle = 'iso, mdy'
intervalstyle = 'postgres'
timezone = 'PRC'
timezone_abbreviations = 'Default' # Select the set of available time zone abbreviations. Currently, there are Default、Australia (historical usage)、India。You can create your own file in share/timezonesets/.
extra_float_digits = 0 # min -15, max 3
client_encoding = sql_ascii # actually, defaults to database encoding # These settings are initialized by initdb, but they can be changed.
lc_messages = 'en_US.UTF-8' # locale for system error message strings
lc_monetary = 'en_US.UTF-8' # locale for monetary formatting
lc_numeric = 'en_US.UTF-8' # locale for number formatting
lc_time = 'en_US.UTF-8' # locale for time formatting # default configuration for text search
default_text_search_config = 'pg_catalog.english' 3、Other Defaults
dynamic_library_path = '$libdir'
local_preload_libraries = ''
session_preload_libraries = ''

10 LOCK MANAGEMENT

10.1 deadlock_timeout

数字型
默认: deadlock_timeout = 1s
在检查死锁前,等待锁的时间
deadlock检查机制执行的代价比较高,因此在符合较重、locK动作较多的系统里,可以适当地增大deadlock_timeout

10.2 其他

max_locks_per_transaction = 64         # min 10 (change requires restart)
max_pred_locks_per_transaction = 64 # min 10 (change requires restart)
max_pred_locks_per_relation = -2 # negative values mean (max_pred_locks_per_transaction / -max_pred_locks_per_relation) - 1
max_pred_locks_per_page = 2 # min 0

11 版本/平台兼容性 VERSION/PLATFORM COMPATIBILITY

11.1 以前的PostgreSQL版本 Previous PostgreSQL Versions

array_nulls = on
backslash_quote = safe_encoding # on, off, or safe_encoding
default_with_oids = off
escape_string_warning = on
lo_compat_privileges = off
operator_precedence_warning = off
quote_all_identifiers = off
standard_conforming_strings = on
synchronize_seqscans = on

11.2 Other Platforms and Clients

transform_null_equals = off

12 ERROR HANDLING

exit_on_error = off                    # terminate session on any error?
restart_after_crash = on # reinitialize after backend crash?

13 CONFIG FILE INCLUDES

include_dir = 'conf.d'                 # include files ending in '.conf' from directory 'conf.d'
include_if_exists = 'exists.conf' # include file only if it exists
include = 'special.conf' # include file

PostgreSQL配置文件--其他的更多相关文章

  1. postgresql 配置文件优化

    postgresql 配置文件优化 配置文件 默认的配置配置文件是保存在/etc/postgresql/VERSION/main目录下的postgresql.conf文件 如果想查看参数修改是否生效, ...

  2. 过滤PostgreSQL配置文件中被注释的部分

    以下正则可以过滤掉PostgreSQL配置文件被注释的部分,包括'#'前带空格的部分,但参数前带空格的部分不会过滤掉 postgres@linux-ij7j:/opt/pg8122/data> ...

  3. PostgreSQL配置文件--WAL

    3 WAL WRITE AHEAD LOG 3.1 Settings 3.1.1 fsync 字符串 默认: fsync = on 开启后强制把数据同步更新到磁盘,可以保证数据库将在OS或者硬件崩溃的 ...

  4. PostgreSQL配置文件--日志和错误

    6 错误操作和日志 ERROR REPORTING AND LOGGING 6.1 日志写到哪里 Where to Log 6.1.1 log_destination 字符串 默认: log_dest ...

  5. PostgreSQL配置文件--QUERY TUNING

    5 QUERY TUNING 5.1 Planner Method Configuration. 下列参数控制查询优化器是否使用特定的存取方法.除非对优化器特别了解,一般情况下,使用它们默认值即可. ...

  6. PostgreSQL配置文件--资源使用(除WAL外)

    2 资源使用(除WAL外) RESOURCE USAGE (except for WAL) 2.1 内存 Memory 2.1.1 shared_buffers 数字型 默认: shared_buff ...

  7. PostgreSQL配置文件--连接和认证

    1 连接和认证 CONNECTIONS AND AUTHENTICATION 1.1 连接 CONNECTIONS 1.1.1 listen_addresses 字符型 默认: listen_addr ...

  8. PostgreSQL配置文件--AUTOVACUUM参数

    8 AUTOVACUUM参数 AUTOVACUUM PARAMETERS 8.1 autovacuum 字符型 默认: autovacuum = on Enable autovacuum subpro ...

  9. PostgreSQL配置文件--实时统计

    7 实时统计 RUNTIME STATISTICS 7.1 Query/Index Statistics Collector 下面的参数控制是否搜集特定的数据库运行统计数据 7.1.1 track_a ...

随机推荐

  1. HDU-5273

    Dylans loves sequence Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/ ...

  2. DataSet、DataTable、DataRow的数据复制方法

    DataSet 对象是支持 ADO.NET的断开式.分布式数据方案的核心对象 ,用途非常广泛.我们很多时候需要使用其中的数据,比如取得一个DataTable的数据或者复制另一个DataTabe中的数据 ...

  3. 【hdoj_2079】选课时间(母函数)

    题目:http://acm.hdu.edu.cn/showproblem.php?pid=2079 此题采用母函数的知识求解,套用母函数模板即可: http://blog.csdn.net/ten_s ...

  4. DuplicateHandle

    功能:将一个进程内的伪句柄,转化为可以用来进程间通信的实句柄 BOOL DuplicateHandle(  HANDLE hSourceProcessHandle,  HANDLE hSourceHa ...

  5. Windows7 + OSG3.6 + VS2017 + Qt5.11

    一.准备工作 下载需要的材料: 1. OSG稳定版源代码, 3.6.3版本 2. 第三方库,选择VS2017对应的版本  https://download.osgvisual.org/3rdParty ...

  6. Django学生管理系统添加学生时,报错Not Found: /POST

    最近在学习Django,跟着视频写了一个学生系统,主要是增删改查操作,界面丑的一匹 1.url.py from django.contrib import admin from django.urls ...

  7. bzoj 1485 卡特兰数 + 分解因子

    思路:打表可以看出是卡特兰数,但是模数不一定是素数,所以需要分解一下因数. #include<bits/stdc++.h> #define LL long long #define fi ...

  8. Python Unicode与中文处理(转)

    Python Unicode与中文处理 python中的unicode是让人很困惑.比较难以理解的问题,本文力求彻底解决这些问题: 1.unicode.gbk.gb2312.utf-8的关系: htt ...

  9. SpringBoot+Mybatis整合实例

    前言 大家都知道springboot有几大特点:能创建独立的Spring应用程序:能嵌入Tomcat,无需部署WAR文件:简化Maven配置:自动配置Spring等等.这里整合mybatis,创建一个 ...

  10. 用jquery实现文章自动生成二级目录(续)

    前文:用jquery实现文章自动生成二级目录. 使用方法的补充 我们可以把我们的js和css上传到博客园,然后在页面HTML代码中使用他们. 发现的一些问题 在我把我的js放到自己的博客园上运行之后发 ...