summaryrefslogtreecommitdiff
path: root/doc/src/sgml/auto-explain.sgml
AgeCommit message (Collapse)Author
2025-02-27EXPLAIN: Always use two fractional digits for row counts.Robert Haas
Commit ddb17e387aa28d61521227377b00f997756b8a27 attempted to avoid confusing users by displaying digits after the decimal point only when nloops > 1, since it's impossible to have a fraction row count after a single iteration. However, this made the regression tests unstable since parallal queries will have nloops>1 for all nodes below the Gather or Gather Merge in normal cases, but if the workers don't start in time and the leader finishes all the work, they will suddenly have nloops==1, making it unpredictable whether the digits after the decimal point would be displayed or not. Although 44cbba9a7f51a3888d5087fc94b23614ba2b81f2 seemed to fix the immediate failures, it may still be the case that there are lower-probability failures elsewhere in the regression tests. Various fixes are possible here. For example, it has previously been proposed that we should try to display the digits after the decimal point only if rows/nloops is an integer, but currently rows is storead as a float so it's not theoretically an exact quantity -- precision could be lost in extreme cases. It has also been proposed that we should try to display the digits after the decimal point only if we're under some sort of construct that could potentially cause looping regardless of whether it actually does. While such ideas are not without merit, this patch adopts the much simpler solution of always display two decimal digits. If that approach stands up to scrutiny from the buildfarm and human users, it spares us the trouble of doing anything more complex; if not, we can reassess. This commit incidentally reverts 44cbba9a7f51a3888d5087fc94b23614ba2b81f2, which should no longer be needed. Author: Robert Haas <[email protected]> Author: Ilia Evdokimov <[email protected]> Discussion: http://postgr.es/m/CA+TgmoazzVHn8sFOMFAEwoqBTDxKT45D7mvkyeHgqtoD2cn58Q@mail.gmail.com
2023-01-20Describe each contrib module in its SGML section titleAlvaro Herrera
The original titles only had the module name, which is not very useful when scanning the list. By adding a very brief description to each title, the table of contents becomes friendlier. Also amend the introduction in the "additional modules" appendix, using the word "Extension" more extensively. Nowadays, almost all contrib modules are extensions, so this is also helpful. Author: Karl O. Pinc <[email protected]> Reviewed-by: Brar Piening <[email protected]> Discussion: https://postgr.es/m/[email protected]
2023-01-09Doc: add XML ID attributes to <sectN> and <varlistentry> tags.Tom Lane
This doesn't have any external effect at the moment, but it will allow adding useful link-discoverability features later. Brar Piening, reviewed by Karl Pinc. Discussion: https://postgr.es/m/CAB8KJ=jpuQU9QJe4+RgWENrK5g9jhoysMw2nvTN_esoOU0=a_w@mail.gmail.com
2023-01-03Fix typos in comments, code and documentationMichael Paquier
While on it, newlines are removed from the end of two elog() strings. The others are simple grammar mistakes. One comment in pg_upgrade referred incorrectly to sequences since a7e5457. Author: Justin Pryzby Discussion: https://postgr.es/m/[email protected] Backpatch-through: 11
2022-07-06autho_explain: Add GUC to log query parametersMichael Paquier
auto_explain.log_parameter_max_length is a new GUC part of the extension, similar to the corresponding core setting, that controls the inclusion of query parameters in the logged explain output. More tests are added to check the behavior of this new parameter: when parameters logged in full (the default of -1), when disabled (value of 0) and when partially truncated (value different than the two others). Author: Dagfinn Ilmari Mannsåker Discussion: https://postgr.es/m/[email protected]
2020-11-02Fix some grammar and typos in comments and docsMichael Paquier
The documentation fixes are backpatched down to where they apply. Author: Justin Pryzby Discussion: https://postgr.es/m/[email protected] Backpatch-through: 9.6
2020-04-14Fix collection of typos and grammar mistakes in the tree, volume 2Michael Paquier
This fixes some comments and documentation new as of Postgres 13, and is a follow-up of the work done in dd0f37e. Author: Justin Pryzby Discussion: https://postgr.es/m/[email protected]
2020-04-06Add the option to report WAL usage in EXPLAIN and auto_explain.Amit Kapila
This commit adds a new option WAL similar to existing option BUFFERS in the EXPLAIN command. This option allows to include information on WAL record generation added by commit df3b181499 in EXPLAIN output. This also allows the WAL usage information to be displayed via the auto_explain module. A new parameter auto_explain.log_wal controls whether WAL usage statistics are printed when an execution plan is logged. This parameter has no effect unless auto_explain.log_analyze is enabled. Author: Julien Rouhaud Reviewed-by: Dilip Kumar and Amit Kapila Discussion: https://postgr.es/m/CAB-hujrP8ZfUkvL5OYETipQwA=e3n7oqHFU=4ZLxWS_Cza3kQQ@mail.gmail.com
2019-04-28Fix more typos and inconsistencies in documentationMichael Paquier
This fixes a couple of grammar mistakes, typos and inconsistencies in the documentation. Particularly, the configuration parsing allows only "kB" to mean kilobyte but there were references in the docs to "KB". Some instances of the latter are still in the code comments. Some parameter values were mentioned with "Minus-one", and using directly "-1" with proper markups is more helpful to the reader. Some of these have been pointed out by Justin, and some others are things I bumped into. Author: Justin Pryzby, Michael Paquier Reviewed-by: Tom Lane Discussion: https://postgr.es/m/[email protected]
2019-04-03Add SETTINGS option to EXPLAIN, to print modified settings.Tomas Vondra
Query planning is affected by a number of configuration options, and it may be crucial to know which of those options were set to non-default values. With this patch you can say EXPLAIN (SETTINGS ON) to include that information in the query plan. Only options affecting planning, with values different from the built-in default are printed. This patch also adds auto_explain.log_settings option, providing the same capability in auto_explain module. Author: Tomas Vondra Reviewed-by: Rafia Sabih, John Naylor Discussion: https://postgr.es/m/[email protected]
2018-07-31Remove SGMLism from commit 2d36a5e9dab6Andrew Dunstan
2018-07-31Provide a log_level setting for auto_explainAndrew Dunstan
Up to now the log level has been hardcoded at LOG. A new auto_explain.log_level setting allows that to be modified. Discussion: https://postgr.es/m/CAPPfruyZh+snR2AdmutrA0B_caj=yWZkLqxUTZYNjJCaQ_wKQg@mail.gmail.com Tom Dunstan and Andrew Dunstan Reviewed by Daniel Gustafsson
2017-11-23Convert documentation to DocBook XMLPeter Eisentraut
Since some preparation work had already been done, the only source changes left were changing empty-element tags like <xref linkend="foo"> to <xref linkend="foo"/>, and changing the DOCTYPE. The source files are still named *.sgml, but they are actually XML files now. Renaming could be considered later. In the build system, the intermediate step to convert from SGML to XML is removed. Everything is build straight from the source files again. The OpenSP (or the old SP) package is no longer needed. The documentation toolchain instructions are updated and are much simpler now. Peter Eisentraut, Alexander Lakhin, Jürgen Purtz
2017-10-17Don't use SGML empty tagsPeter Eisentraut
For DocBook XML compatibility, don't use SGML empty tags (</>) anymore, replace by the full tag name. Add a warning option to catch future occurrences. Alexander Lakhin, Jürgen Purtz
2016-03-13Rename auto_explain.sample_ratio to sample_rateMagnus Hagander
Per suggestion from Tomas Vondra Author: Julien Rouhaud
2016-03-11Allow setting sample ratio for auto_explainMagnus Hagander
New configuration parameter auto_explain.sample_ratio makes it possible to log just a fraction of the queries meeting the configured threshold, to reduce the amount of logging. Author: Craig Ringer and Julien Rouhaud Review: Petr Jelinek
2014-09-19Fix failure of contrib/auto_explain to print per-node timing information.Tom Lane
This has been broken since commit af7914c6627bcf0b0ca614e9ce95d3f8056602bf, which added the EXPLAIN (TIMING) option. Although that commit included updates to auto_explain, they evidently weren't tested very carefully, because the code failed to print node timings even when it should, due to failure to set es.timing in the ExplainState struct. Reported off-list by Neelakanth Nadgir of Salesforce. In passing, clean up the documentation for auto_explain's options a little bit, including re-ordering them into what seems to me a more logical order.
2014-05-07doc: Fix DocBook XML validityPeter Eisentraut
The main problem is that DocBook SGML allows indexterm elements just about everywhere, but DocBook XML is stricter. For example, this common pattern <varlistentry> <indexterm>...</indexterm> <term>...</term> ... </varlistentry> needs to be changed to something like <varlistentry> <term>...<indexterm>...</indexterm></term> ... </varlistentry> See also bb4eefe7bf518e42c73797ea37b033a5d8a8e70a. There is currently nothing in the build system that enforces that things stay valid, because that requires additional tools and will receive separate consideration.
2014-03-04auto_explain: Add logging of trigger executionAlvaro Herrera
Author: Kyotaro HORIGUCHI Reviewed-by: Jaime Casanova
2013-08-09Document how auto_explain.log_timing can be changed.Fujii Masao
2013-07-13Add session_preload_libraries configuration parameterPeter Eisentraut
This is like shared_preload_libraries except that it takes effect at backend start and can be changed without a full postmaster restart. It is like local_preload_libraries except that it is still only settable by a superuser. This can be a better way to load modules such as auto_explain. Since there are now three preload parameters, regroup the documentation a bit. Put all parameters into one section, explain common functionality only once, update the descriptions to reflect current and future realities. Reviewed-by: Dimitri Fontaine <[email protected]>
2013-05-29Document auto_explain.log_timing.Robert Haas
Tomas Vondra
2012-01-27Fix wording, per Peter GeogheganMagnus Hagander
2011-10-04Remove the custom_variable_classes parameter.Tom Lane
This variable provides only marginal error-prevention capability (since it can only check the prefix of a qualified GUC name), and the consensus is that that isn't worth the amount of hassle that maintaining the setting creates for DBAs. So, let's just remove it. With this commit, the system will silently accept a value for any qualified GUC name at all, whether it has anything to do with any known extension or not. (Unqualified names still have to match known built-in settings, though; and you will get a WARNING at extension load time if there's an unrecognized setting with that extension's prefix.) There's still some discussion ongoing about whether to tighten that up and if so how; but if we do come up with a solution, it's not likely to look anything like custom_variable_classes.
2011-05-08Add xreflabels to /contrib manuals so links appear correct. Also updateBruce Momjian
README.links to explain xref properly.
2011-01-29Properly capitalize documentation headings; some only had initial-wordBruce Momjian
capitalization.
2010-11-23Remove useless whitespace at end of linesPeter Eisentraut
2010-09-20Remove cvs keywords from all files.Magnus Hagander
2010-07-29Fix indentation of verbatim block elementsPeter Eisentraut
Block elements with verbatim formatting (literallayout, programlisting, screen, synopsis) should be aligned at column 0 independent of the surrounding SGML, because whitespace is significant, and indenting them creates erratic whitespace in the output. The CSS stylesheets already take care of indenting the output. Assorted markup improvements to go along with it.
2010-04-03Remove unnecessary xref endterm attributes and title idsPeter Eisentraut
The endterm attribute is mainly useful when the toolchain does not support automatic link target text generation for a particular situation. In the past, this was required by the man page tools for all reference page links, but that is no longer the case, and it now actually gets in the way of proper automatic link text generation. The only remaining use cases are currently xrefs to refsects.
2010-02-20Adjust sample auto-explain output to reflect query text inclusion.Andrew Dunstan
2009-12-15Add an EXPLAIN (BUFFERS) option to show buffer-usage statistics.Robert Haas
This patch also removes buffer-usage statistics from the track_counts output, since this (or the global server statistics) is deemed to be a better interface to this information. Itagaki Takahiro, reviewed by Euler Taveira de Oliveira.
2009-12-11Add YAML to list of EXPLAIN formats. Greg Sabino Mullane, reviewed by ↵Andrew Dunstan
Takahiro Itagaki.
2009-08-10Extend EXPLAIN to support output in XML or JSON format.Tom Lane
There are probably still some adjustments to be made in the details of the output, but this gets the basic structure in place. Robert Haas
2009-01-02Tweak guc.c to allow underscores in the names of custom variable classes,Tom Lane
and change auto_explain's custom GUC variables to be named auto_explain.xxx not just explain.xxx. Per discussion in connection with the pg_stat_statements patch, it seems like a good idea to have the convention that custom variable classes are named the same as their defining module. Committing separately since this should happen regardless of what happens with pg_stat_statements itself.
2008-12-07Desultorily enclose programlisting tags in CDATA, to get rid of some obnoxiousAlvaro Herrera
SGML-escaping.
2008-11-19Add auto-explain contrib module for automatic logging of the plans ofTom Lane
slow-running queries. Takahiro Itagaki