資訊內(nèi)容
postgresql日志放在哪里
KL0少兒編程網(wǎng)-Scratch_Python_教程_免費兒童編程學(xué)習(xí)平臺
PostgreSQL有3種日志:KL0少兒編程網(wǎng)-Scratch_Python_教程_免費兒童編程學(xué)習(xí)平臺
1)pg_log(數(shù)據(jù)庫運行日志)內(nèi)容可讀,默認(rèn)關(guān)閉的,需要設(shè)置參數(shù)啟動KL0少兒編程網(wǎng)-Scratch_Python_教程_免費兒童編程學(xué)習(xí)平臺
2)pg_xlog(WAL 日志,即重做日志) 內(nèi)容一般不具有可讀性,強制開啟KL0少兒編程網(wǎng)-Scratch_Python_教程_免費兒童編程學(xué)習(xí)平臺
3)pg_clog(事務(wù)提交日志,記錄的是事務(wù)的元數(shù)據(jù)) 內(nèi)容一般不具有可讀性,強制開啟KL0少兒編程網(wǎng)-Scratch_Python_教程_免費兒童編程學(xué)習(xí)平臺
pg_xlog和pg_clog一般是在$PGDATA/下面的文件夾下,pg_log默認(rèn)路徑是$PGDATA/pg_log,通常可自定義路徑和文件名。KL0少兒編程網(wǎng)-Scratch_Python_教程_免費兒童編程學(xué)習(xí)平臺
[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 :' ---日志每行的標(biāo)準(zhǔn)格式推薦:PostgreSQL教程KL0少兒編程網(wǎng)-Scratch_Python_教程_免費兒童編程學(xué)習(xí)平臺
- 上一篇
python讀取文本內(nèi)容中文亂碼怎么解決
簡介python讀取文本內(nèi)容亂碼的解決方法:1、查看文件編碼方式:import chardetfobj=open(fname,'r')data=fobj.read()print chardet.detect(data)['encoding']2、編碼類
- 下一篇
2020年04月最新 Web 服務(wù)器流行度調(diào)查報告
簡介在我們進(jìn)行web開發(fā)的第一步就是選擇一個web服務(wù)器,現(xiàn)在市面上有許多流行的web服務(wù)器供我們選擇,有許多因素會影響我們的選擇,本文就來為大家介紹一下2020年4月最新web服務(wù)器的流行度,希望對大家有一定的幫助。Web服務(wù)器調(diào)查報告Netcraft是一家總部位于英國巴斯始于1995年的互聯(lián)網(wǎng)服務(wù)公
