Understanding postgresql.conf : log*】的更多相关文章

After loooong pause, adding next (well, second) post to the “series“. This time, I'd like to describe how logging works. And I don't mean binary logging (WAL), but the log for us, humans, to read. Before I will go to the postgresql.conf options, let…
While there are some docs on it, I decided to write about it, in perhaps more accessible language – not as a developer, but as PostgreSQL user. Some parts (quite large parts) were described in one of my earlier posts, but I'll try to concentrate on W…
使用yum安装完postgresql,没有使用默认的DATA地址,自己配置了DATA地址以后,使用root权限启动service service postgresql start ,报出了"FAILED" 不解,检查Log文件 /var/lib/pgsql/pgstartup.log. 发现如下记录 postmaster cannot access the server configuration file "/var/lib/pgsql/data/postgresql.co…
一.连接配置与安全认证 1.连接Connection Settings   listen_addresses (string) 这个参数只有在启动数据库时,才能被设置.它指定数据库用来监听客户端连接的TCP/IP地址.默认是值是* ,表示数据库在启动以后将在运行数据的机器上的所有的IP地址上监听用户请求(如果机器只有一个网卡,只有一个IP地址,有多个网卡的机器有多个 IP地址).可以写成机器的名字,也可以写成IP地址,不同的值用逗号分开,例如,’server01’, ’140.87.171.49…
一.设置参数 所有参数名称都是不区分大小写的 值为字符串时,需要单引号 值为数值时不需要单引号,但带单位时,需要单引号 配置文件(如:postgresql.conf.postgresql.auto.conf.pg_hba.conf) 默认在 database cluster 中 可以在 postgresql.conf 中使用 include ‘file’ 或 include_dir ‘directory’ 形式插入外部文件或目录(其中的所有文件)内容  二.文件位置 data_directory…
1        Set max_connections to three times the number of processor cores on the server. Include virtual (hyperthreading) cores. Set shared_buffers             to 4GB for servers with up to 64 GB of RAM. Use 8GB for systems with more than 64 GB of RA…
listen_addresses:#指定数据库用来监听客户端连接的TCP/IP地址,默认是值是* ,表示数据库在启动以后将在运行数据的机器上的所有的IP地址上监听用户请求,可以写成机器的名字,也可以写成IP地址,不同的值用逗号分开,如果被设成localhost,表示数据库只能接受本地的客户端连接请求,不能接受远程的客户端连接请求 listen_addresses = '0.0.0.0' #监听IPv4的所有IP. port:#指定数据库监听户端连接的TCP端口.默认值是5432 max_conn…
磨砺技术珠矶,践行数据之道,追求卓越价值 回到上一级页面: PostgreSQL基础知识与基本操作索引页     回到顶级页面:PostgreSQL索引页 通过实验,可以发现,PostgreSQL中使用WAL log来存储到其他地方,来辅助完成PITR. 但是,WAL是16MB一个, 缺省情况下,如果一个WAL文件没有写满,它就不会被archive_command 调用来拷贝走. 如果长时间没有太多作业,可能有点WAL log会一直位于pg_xlog目录下作为online redo log存在.…
之前在研究pgpoll时,发现trigger_file参数指定的文件存在后,会自动将standby节点提升为可写节点.不需要手动执行pg_ctl promote,但是这个时间一般有延迟,因为进程会定期检查复制过程. 今天发现primary_conninfo信息改变,复制过程不会变化,需要重启standby节点. .............................................................................................…
原文:https://tableplus.io/blog/2018/10/how-to-show-queries-log-in-postgresql.html -------------------------------------------------- In this post, we are going to discuss how to log all executed queries for inspection later in PostgreSQL. 1. First, you…