新聞中心
postgresql怎么查看正在歸檔的日志文件
主要需要修改的參數(shù)如下,參數(shù)修改完畢后重啟服務(wù),重新連接數(shù)據(jù)庫,對其操作即可查看日志變化情況.
專注于為中小企業(yè)提供成都做網(wǎng)站、網(wǎng)站設(shè)計服務(wù),電腦端+手機端+微信端的三站合一,更高效的管理,為中小企業(yè)恩施土家免費做網(wǎng)站提供優(yōu)質(zhì)的服務(wù)。我們立足成都,凝聚了一批互聯(lián)網(wǎng)行業(yè)人才,有力地推動了成百上千企業(yè)的穩(wěn)健成長,幫助中小企業(yè)通過網(wǎng)站建設(shè)實現(xiàn)規(guī)模擴充和轉(zhuǎn)變。
# - When to Log -
client_min_messages = info
#client_min_messages = notice # values in order of decreasing
detail:
# debug5
# debug4
# debug3
# debug2
# debug1
# log
# notice
# warning
# error
log_min_messages = info
#log_min_messages = warning # values in order of decreasing
detail:
# debug5
# debug4
# debug3
# debug2
# debug1
# info
# notice
# warning
# error
# log
# fatal
# panic
log_min_error_statement = info
#log_min_error_statement = error # values in order of decreasing
detail:
# debug5
# debug4
# debug3
# debug2
# debug1
# info
# notice
# warning
# error
# log
# fatal
# panic (effectively off)
#log_min_duration_statement = -1 # -1 is disabled, 0 logs all
statements
# and their durations, 0
logs only
# statements running at least
this number
# of milliseconds
# - What to Log -
#debug_print_parse = off
#debug_print_rewritten = off
#debug_print_plan = off
#debug_pretty_print = on
#log_checkpoints = off
log_connections = on
log_disconnections = on
#log_duration = off
log_error_verbosity = verbose # terse, default, or verbose
messages
#log_hostname = off
log_line_prefix = '%a %u %d %h %t %i %e ' # special
values:
# %a = application name
# %u = user name
# %d = database name
# %r = remote host and
port(this is a os port)
# %h = remote host
# %p = process ID
# %t = timestamp without
milliseconds
# %m = timestamp with
milliseconds
# %i = command tag
# %e = SQL state
# %c = session ID
# %l = session line number
# %s = session start
timestamp
# %v = virtual transaction
ID
# %x = transaction ID (0 if
none)
# %q = stop here in
non-session
# processes
# %% = '%'
# e.g. ' '
#log_lock_waits = off # log lock waits =
deadlock_timeout
log_statement = 'all' # none, ddl, mod, all
#log_temp_files = -1 # log temporary files equal or
larger
# than the specified size in
kilobytes;
# -1 disables, 0 logs all temp
files
log_timezone = 'Asia/Hong_Kong'
如若滿意,請點擊右側(cè)【采納答案】,如若還有問題,請點擊【追問】
希望我的回答對您有所幫助,望采納!
如何在postgresql下打開日志文件
在安裝Postgresql后,有天突然發(fā)現(xiàn)C盤空間變小,就逐個排查,最后發(fā)現(xiàn)Postgresql文件占了10多G,再進去data目錄,發(fā)現(xiàn)最大的是pg_log目錄,占的空間差不多10G。打開一看,是記錄其每天的運行日志目錄,差不多2000個文件,每個文件幾十M。
經(jīng)了解,這是由于其沒有重用日志文件造成的,故可以通過設(shè)置postgresql.conf文件,修改log_truncate_on_rotation選項為on,即可重用同名日志文件,在其末尾添加新的日志信息。
如何查看postgresql數(shù)據(jù)庫日志
1、通過命令行查詢
\d 數(shù)據(jù)庫 —— 得到所有表的名字
\d 表名 —— 得到表結(jié)構(gòu)
2、通過SQL語句查詢
"select * from pg_tables" —— 得到當(dāng)前db中所有表的信息(這里pg_tables是系統(tǒng)視圖)
"select tablename from pg_tables where schemaname='public'" —— 得到所有用戶自定義表的名字(這里"tablename"字段是表的名字,"schemaname"是schema的名字。用戶自定義的表,如果未經(jīng)特殊處理,默認(rèn)都是放在名為public的schema下)
adempiere3.7 postgresql 安裝時測試總是失敗,怎么回事?日志如下
那說明安裝文件本身就是有問題的 也有可能是某些部分不支持中文目錄 你可以改成英文目錄再試試,如果 仍有這樣的問題,那說明安裝包 制作的時候就有問題了
新聞名稱:日志postgresql的簡單介紹
網(wǎng)站路徑:http://www.ef60e0e.cn/article/dscohpj.html