Skip to content

Commit fb0ebfd

Browse files
committed
update 9
1 parent 1c0682b commit fb0ebfd

File tree

1 file changed

+3
-33
lines changed

1 file changed

+3
-33
lines changed

CN/modules/ROOT/pages/master/100.adoc

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[%sectnums]
12
:sectnumlevels: 16
23

34
== PostgreSQL 参数参考手册
@@ -16,7 +17,7 @@
1617

1718
请在 https://github.com/IvorySQL/ivorysql_docs/issues[https://github.com/IvorySQL/ivorysql_docs/issues]提交issue。
1819

19-
:sectnums:
20+
[%sectnums]
2021
=== Resource Usage / Disk
2122

2223
[cols="136,387"]
@@ -263,7 +264,7 @@ h| 参数名称 h| exit_on_error
263264
| 取值范围 | on和off
264265
| 参数单位 |
265266
| 参数含义
266-
a| 当设置为on时,任何error均会导致session被终止。默认情况下,本参数值为off,只有FATAL error才会终止session。 postgres=# set exit_on_error=on; SET postgres=# show exit_on_error ; -[RECORD 1]-+--- exit_on_error | on +
267+
a| 当设置为on时,任何error均会导致session被终止。默认情况下,本参数值为off,只有FATAL error才会终止session。 postgres=# set exit_on_error=on; SET postgres=# show exit_on_error ; -[RECORD 1]-+--- exit_on_error \| on +
267268
postgres=# begin; BEGIN postgres=*# select \* form t1; FATAL: syntax error at or near "form" LINE 1: select \* form t1; ^ server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. The connection to the server was lost. Attempting reset: Succeeded.postgres=#
268269

269270
| 是否可session级修改 | 是
@@ -5268,37 +5269,6 @@ h| 参数名称 h| log_line_prefix |
52685269

52695270
| 参数含义
52705271
a| 控制运行日志中每行开头的输出内容。
5271-
5272-
[cols="21,132,25"]
5273-
|===
5274-
h| *Escape* h| *Effect* h| *Session only*
5275-
| %a | Application name | yes
5276-
| %u | User name | yes
5277-
| %d | Database name | yes
5278-
| %r | Remote host name or IP address, and remote port | yes
5279-
| %h | Remote host name or IP address | yes
5280-
| %b | Backend type | no
5281-
| %p | Process ID | no
5282-
| %t | Time stamp without milliseconds | no
5283-
| %m | Time stamp with milliseconds | no
5284-
| %n | Time stamp with milliseconds (as a Unix epoch) | no
5285-
| %i | Command tag: type of session's current command | yes
5286-
| %e | SQLSTATE error code | no
5287-
| %c | Session ID: see below | no
5288-
| %l | Number of the log line for each session or process, starting at 1 | no
5289-
| %s | Process start time stamp | no
5290-
| %v | Virtual transaction ID (backendID/localXID) | no
5291-
| %x | Transaction ID (0 if none is assigned) | no
5292-
| %q | Produces no output, but tells non-session processes to stop at this point in the string; ignored by session processes | no
5293-
| %% | Literal % | no
5294-
5295-
|===
5296-
backend type 列对应于pg_stat_activity视图的backend_type列,还有一些额外的type会显示在运行日志中但不显示在pg_stat_activity视图中。 +
5297-
%c通配符打印准唯一的session标识符,有2个四字节十六进制的数字(不包括开头的零),中间以点分隔。该数字是process start time和process id,因此%c可以被用做打印这些项目的节省空间的方式。请使用如下sql来生成会话标识符: postgres=# SELECT to_hex(trunc(EXTRACT(EPOCH FROM backend_start))::integer) || '.' || postgres-# to_hex(pid) postgres-# FROM pg_stat_activity; ?column? --------------- 60b174d1.6500 60b174d1.6503 60d0421b.3e9d 60b174d1.64fe 60b174d1.64fd 60b174d1.64ff (6 rows) +
5298-
postgres=# +
5299-
请注意1:如果为 设置log_line_prefix参数值设置为非空值,通常应将其最后一个字符设为空格,以提供与日志行其余部分的视觉分离。也可以使用标点符号。 +
5300-
请注意2: Syslog会生成自己的timestamp以及process id信息,因此,当你将日志输出为syslog时,你可能不希望包括此类的通配符。 +
5301-
53025272
|
53035273

53045274
| 是否可session级修改 | 否 |

0 commit comments

Comments
 (0)