资讯内容
postgresql日志放在哪里
KL0少儿编程网-Scratch_Python_教程_免费儿童编程学习平台
PostgreSQL有3种日志:KL0少儿编程网-Scratch_Python_教程_免费儿童编程学习平台
1)pg_log(数据库运行日志)内容可读,默认关闭的,需要设置参数启动KL0少儿编程网-Scratch_Python_教程_免费儿童编程学习平台
2)pg_xlog(WAL 日志,即重做日志) 内容一般不具有可读性,强制开启KL0少儿编程网-Scratch_Python_教程_免费儿童编程学习平台
3)pg_clog(事务提交日志,记录的是事务的元数据) 内容一般不具有可读性,强制开启KL0少儿编程网-Scratch_Python_教程_免费儿童编程学习平台
pg_xlog和pg_clog一般是在$PGDATA/下面的文件夹下,pg_log默认路径是$PGDATA/pg_log,通常可自定义路径和文件名。KL0少儿编程网-Scratch_Python_教程_免费儿童编程学习平台
[root@pg ~]# cd /home/pgsql/9.1/data/ You have mail in /var/spool/mail/root [root@pg data]# ll total 460 drwx------ 19 postgres postgres 4096 Nov 27 17:58 base drwx------ 2 postgres postgres 4096 Jan 13 18:58 global drwx------ 2 postgres postgres 4096 Jan 14 02:36 pg_clog --clog -rw------- 1 postgres postgres 3513 Dec 4 09:36 pg_hba.conf -rw------- 1 postgres postgres 1636 Mar 31 2015 pg_ident.conf drwx------ 2 postgres postgres 4096 Jan 14 04:35 pg_log --log drwx------ 4 postgres postgres 4096 Mar 31 2015 pg_multixact drwx------ 2 postgres postgres 4096 Dec 10 10:37 pg_notify drwx------ 2 postgres postgres 4096 Mar 31 2015 pg_serial drwx------ 2 postgres postgres 4096 Jan 14 10:23 pg_stat_tmp drwx------ 2 postgres postgres 20480 Jan 14 09:56 pg_subtrans drwx------ 3 postgres postgres 4096 Mar 31 2015 pg_tblspc drwx------ 2 postgres postgres 4096 Mar 31 2015 pg_twophase -rw------- 1 postgres postgres 4 Mar 31 2015 PG_VERSION drwx------ 3 postgres postgres 360448 Jan 14 10:17 pg_xlog --xlog -rw------- 1 postgres postgres 19278 Jan 7 11:13 postgresql.conf -rw------- 1 postgres postgres 56 Dec 4 09:39 postmaster.opts -rw------- 1 postgres postgres 70 Dec 10 10:37 postmaster.pid -rw-r--r-- 1 postgres postgres 434 Mar 31 2015 serverlog [postgres@pg data]$ more postgresql.conf log_destination = 'stderr' logging_collector = on log_directory = 'pg_log' ---可自定义路径 log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' ---日志文件名 log_line_prefix = '%t-%d-%h-%a :' ---日志每行的标准格式推荐:PostgreSQL教程KL0少儿编程网-Scratch_Python_教程_免费儿童编程学习平台
- 上一篇
python读取文本内容中文乱码怎么解决
简介python读取文本内容乱码的解决方法:1、查看文件编码方式:import chardetfobj=open(fname,'r')data=fobj.read()print chardet.detect(data)['encoding']2、编码类
- 下一篇
2020年04月最新 Web 服务器流行度调查报告
简介在我们进行web开发的第一步就是选择一个web服务器,现在市面上有许多流行的web服务器供我们选择,有许多因素会影响我们的选择,本文就来为大家介绍一下2020年4月最新web服务器的流行度,希望对大家有一定的帮助。Web服务器调查报告Netcraft是一家总部位于英国巴斯始于1995年的互联网服务公