資訊內容
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年的互聯網服務公