Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
e2a0fc53
Commit
e2a0fc53
authored
Mar 04, 2014
by
Alvaro Herrera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto_explain: Add logging of trigger execution
Author: Kyotaro HORIGUCHI Reviewed-by: Jaime Casanova
parent
84df54b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
contrib/auto_explain/auto_explain.c
contrib/auto_explain/auto_explain.c
+14
-0
doc/src/sgml/auto-explain.sgml
doc/src/sgml/auto-explain.sgml
+18
-0
No files found.
contrib/auto_explain/auto_explain.c
View file @
e2a0fc53
...
@@ -25,6 +25,7 @@ static int auto_explain_log_min_duration = -1; /* msec or -1 */
...
@@ -25,6 +25,7 @@ static int auto_explain_log_min_duration = -1; /* msec or -1 */
static
bool
auto_explain_log_analyze
=
false
;
static
bool
auto_explain_log_analyze
=
false
;
static
bool
auto_explain_log_verbose
=
false
;
static
bool
auto_explain_log_verbose
=
false
;
static
bool
auto_explain_log_buffers
=
false
;
static
bool
auto_explain_log_buffers
=
false
;
static
bool
auto_explain_log_triggers
=
false
;
static
bool
auto_explain_log_timing
=
false
;
static
bool
auto_explain_log_timing
=
false
;
static
int
auto_explain_log_format
=
EXPLAIN_FORMAT_TEXT
;
static
int
auto_explain_log_format
=
EXPLAIN_FORMAT_TEXT
;
static
bool
auto_explain_log_nested_statements
=
false
;
static
bool
auto_explain_log_nested_statements
=
false
;
...
@@ -113,6 +114,17 @@ _PG_init(void)
...
@@ -113,6 +114,17 @@ _PG_init(void)
NULL
,
NULL
,
NULL
);
NULL
);
DefineCustomBoolVariable
(
"auto_explain.log_triggers"
,
"Include trigger statistics in plans."
,
"This has no effect unless log_analyze is also set."
,
&
auto_explain_log_triggers
,
false
,
PGC_SUSET
,
0
,
NULL
,
NULL
,
NULL
);
DefineCustomEnumVariable
(
"auto_explain.log_format"
,
DefineCustomEnumVariable
(
"auto_explain.log_format"
,
"EXPLAIN format to be used for plan logging."
,
"EXPLAIN format to be used for plan logging."
,
NULL
,
NULL
,
...
@@ -295,6 +307,8 @@ explain_ExecutorEnd(QueryDesc *queryDesc)
...
@@ -295,6 +307,8 @@ explain_ExecutorEnd(QueryDesc *queryDesc)
ExplainBeginOutput
(
&
es
);
ExplainBeginOutput
(
&
es
);
ExplainQueryText
(
&
es
,
queryDesc
);
ExplainQueryText
(
&
es
,
queryDesc
);
ExplainPrintPlan
(
&
es
,
queryDesc
);
ExplainPrintPlan
(
&
es
,
queryDesc
);
if
(
es
.
analyze
&&
auto_explain_log_triggers
)
ExplainPrintTriggers
(
&
es
,
queryDesc
);
ExplainEndOutput
(
&
es
);
ExplainEndOutput
(
&
es
);
/* Remove last line break */
/* Remove last line break */
...
...
doc/src/sgml/auto-explain.sgml
View file @
e2a0fc53
...
@@ -122,6 +122,24 @@ LOAD 'auto_explain';
...
@@ -122,6 +122,24 @@ LOAD 'auto_explain';
</listitem>
</listitem>
</varlistentry>
</varlistentry>
<varlistentry>
<term>
<varname>auto_explain.log_triggers</varname> (<type>boolean</type>)
</term>
<indexterm>
<primary><varname>auto_explain.log_triggers</> configuration parameter</primary>
</indexterm>
<listitem>
<para>
<varname>auto_explain.log_triggers</varname> causes trigger
execution statistics to be included when an execution plan is logged.
This parameter is off by default. Only superusers can change this
setting. This parameter has no effect unless
<varname>auto_explain.log_analyze</> parameter is set.
</para>
</listitem>
</varlistentry>
<varlistentry>
<varlistentry>
<term>
<term>
<varname>auto_explain.log_format</varname> (<type>enum</type>)
<varname>auto_explain.log_format</varname> (<type>enum</type>)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment