Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Jan 15, 2015
  1. Rearrange explain.c's API so callers need not embed sizeof(ExplainSta…

    Tom Lane authored
    The folly of the previous arrangement was just demonstrated: there's no
    convenient way to add fields to ExplainState without breaking ABI, even
    if callers have no need to touch those fields.  Since we might well need
    to do that again someday in back branches, let's change things so that
    only explain.c has to have sizeof(ExplainState) compiled into it.  This
    costs one extra palloc() per EXPLAIN operation, which is surely pretty
Commits on Jan 6, 2015
  1. @bmomjian

    Update copyright for 2015

    bmomjian authored
    Backpatch certain files through 9.0
Commits on Oct 15, 2014
  1. Print planning time only in EXPLAIN ANALYZE, not plain EXPLAIN.

    Tom Lane authored
    We've gotten enough push-back on that change to make it clear that it
    wasn't an especially good idea to do it like that.  Revert plain EXPLAIN
    to its previous behavior, but keep the extra output in EXPLAIN ANALYZE.
    Per discussion.
    Internally, I set this up as a separate flag ExplainState.summary that
    controls printing of planning time and execution time.  For now it's
    just copied from the ANALYZE option, but we could consider exposing it
    to users.
Commits on Sep 19, 2014
  1. Fix failure of contrib/auto_explain to print per-node timing informat…

    Tom Lane authored
    This has been broken since commit af7914c,
    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.
Commits on Jul 14, 2014
  1. @nmisch

    Add file version information to most installed Windows binaries.

    nmisch authored
    Prominent binaries already had this metadata.  A handful of minor
    binaries, such as pg_regress.exe, still lack it; efforts to eliminate
    such exceptions are welcome.
    Michael Paquier, reviewed by MauMau.
Commits on May 6, 2014
  1. @bmomjian

    pgindent run for 9.4

    bmomjian authored
    This includes removing tabs after periods in C comments, which was
    applied to back branches, so this change should not effect backpatching.
Commits on Mar 4, 2014
  1. @alvherre

    auto_explain: Add logging of trigger execution

    alvherre authored
    Author: Kyotaro HORIGUCHI
    Reviewed-by: Jaime Casanova
Commits on Jan 7, 2014
  1. @bmomjian

    Update copyright for 2014

    bmomjian authored
    Update all files in head, and files COPYRIGHT and legal.sgml in all back
Commits on Jan 1, 2013
  1. @bmomjian

    Update copyrights for 2013

    bmomjian authored
    Fully update git head, and update back branches in ./COPYRIGHT and
    legal.sgml files.
Commits on Aug 29, 2012
  1. @alvherre

    Fix assorted compilation failures in contrib

    alvherre authored
    Evidently I failed to test a compile after my earlier header shuffling.
Commits on Jun 10, 2012
  1. @bmomjian
Commits on Feb 13, 2012
  1. @adunstan

    Fix auto-explain JSON output to be valid JSON.

    adunstan authored
    Problem reported by Peter Eisentraut.
    Backpatched to release 9.0.
Commits on Feb 7, 2012
  1. Add TIMING option to EXPLAIN, to allow eliminating of timing overhead.

    Robert Haas authored
    Sometimes it may be useful to get actual row counts out of EXPLAIN
    (ANALYZE) without paying the cost of timing every node entry/exit.
    With this patch, you can say EXPLAIN (ANALYZE, TIMING OFF) to get that.
    Tomas Vondra, reviewed by Eric Theise, with minor doc changes by me.
Commits on Jan 1, 2012
  1. @bmomjian
Commits on Sep 4, 2011
  1. Clean up the #include mess a little.

    Tom Lane authored
    walsender.h should depend on xlog.h, not vice versa.  (Actually, the
    inclusion was circular until a couple hours ago, which was even sillier;
    but Bruce broke it in the expedient rather than logically correct
    direction.)  Because of that poor decision, plus blind application of
    pgrminclude, we had a situation where half the system was depending on
    xlog.h to include such unrelated stuff as array.h and guc.h.  Clean up
    the header inclusion, and manually revert a lot of what pgrminclude had
    done so things build again.
    This episode reinforces my feeling that pgrminclude should not be run
    without adult supervision.  Inclusion changes in header files in particular
    need to be reviewed with great care.  More generally, it'd be good if we
    had a clearer notion of module layering to dictate which headers can sanely
    include which others ... but that's a big task for another day.
Commits on Sep 1, 2011
  1. @bmomjian
Commits on Apr 7, 2011
  1. Revise the API for GUC variable assign hooks.

    Tom Lane authored
    The previous functions of assign hooks are now split between check hooks
    and assign hooks, where the former can fail but the latter shouldn't.
    Aside from being conceptually clearer, this approach exposes the
    "canonicalized" form of the variable value to guc.c without having to do
    an actual assignment.  And that lets us fix the problem recently noted by
    Bernd Helmle that the auto-tune patch for wal_buffers resulted in bogus
    log messages about "parameter "wal_buffers" cannot be changed without
    restarting the server".  There may be some speed advantage too, because
    this design lets hook functions avoid re-parsing variable values when
    restoring a previous state after a rollback (they can store a pre-parsed
    representation of the value instead).  This patch also resolves a
    longstanding annoyance about custom error messages from variable assign
    hooks: they should modify, not appear separately from, guc.c's own message
    about "invalid parameter value".
Commits on Feb 27, 2011
  1. Refactor the executor's API to support data-modifying CTEs better.

    Tom Lane authored
    The originally committed patch for modifying CTEs didn't interact well
    with EXPLAIN, as noted by myself, and also had corner-case problems with
    triggers, as noted by Dean Rasheed.  Those problems show it is really not
    practical for ExecutorEnd to call any user-defined code; so split the
    cleanup duties out into a new function ExecutorFinish, which must be called
    between the last ExecutorRun call and ExecutorEnd.  Some Asserts have been
    added to these functions to help verify correct usage.
    It is no longer necessary for callers of the executor to call
    AfterTriggerBeginQuery/AfterTriggerEndQuery for themselves, as this is now
    done by ExecutorStart/ExecutorFinish respectively.  If you really need to
    suppress that and do it for yourself, pass EXEC_FLAG_SKIP_TRIGGERS to
    Also, refactor portal commit processing to allow for the possibility that
    PortalDrop will invoke user-defined code.  I think this is not actually
    necessary just yet, since the portal-execution-strategy logic forces any
    non-pure-SELECT query to be run to completion before we will consider
    committing.  But it seems like good future-proofing.
Commits on Jan 1, 2011
  1. @bmomjian
Commits on Sep 20, 2010
  1. @mhagander
Commits on Feb 26, 2010
  1. @bmomjian

    pgindent run for 9.0

    bmomjian authored
Commits on Feb 16, 2010
  1. @adunstan

    Add query text to auto_explain output.

    adunstan authored
    Still to be done: fix docs and fix regression failures under auto_explain.
Commits on Jan 6, 2010
  1. Add missing 'static' keywords.

    Tom Lane authored
Commits on Jan 2, 2010
  1. @bmomjian
Commits on Dec 15, 2009
  1. Add an EXPLAIN (BUFFERS) option to show buffer-usage statistics.

    Robert Haas authored
    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.
Commits on Dec 12, 2009
  1. Export ExplainBeginOutput() and ExplainEndOutput() for auto_explain.

    Robert Haas authored
    Without these functions, anyone outside of explain.c can't actually use
    ExplainPrintPlan, because the ExplainState won't be initialized properly.
    The user-visible result of this was a crash when using auto_explain with
    the JSON output format.
    Report by Euler Taveira de Oliveira.  Analysis by Tom Lane.  Patch by me.
Commits on Dec 11, 2009
  1. @adunstan
Commits on Aug 10, 2009
  1. Extend EXPLAIN to support output in XML or JSON format.

    Tom Lane authored
    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
Commits on Jul 26, 2009
  1. Extend EXPLAIN to allow generic options to be specified.

    Tom Lane authored
    The original syntax made it difficult to add options without making them
    into reserved words.  This change parenthesizes the options to avoid that
    problem, and makes provision for an explicit (and perhaps non-Boolean)
    value for each option.  The original syntax is still supported, but only
    for the two original options ANALYZE and VERBOSE.
    As a test case, add a COSTS option that can suppress the planner cost
    estimates.  This may be useful for including EXPLAIN output in the regression
    tests, which are otherwise unable to cope with cross-platform variations in
    cost estimates.
    Robert Haas
Commits on Jun 11, 2009
  1. @bmomjian
Commits on Jan 5, 2009
  1. Add EmitWarningsOnPlaceholders calls to contrib modules that are like…

    Tom Lane authored
    …ly to
    get listed in custom_variable_classes.
Commits on Jan 2, 2009
  1. Tweak guc.c to allow underscores in the names of custom variable clas…

    Tom Lane authored
    and change auto_explain's custom GUC variables to be named
    not just  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.
Commits on Jan 1, 2009
  1. @bmomjian

    Update copyright for 2009.

    bmomjian authored
Commits on Nov 19, 2008
  1. Add auto-explain contrib module for automatic logging of the plans of

    Tom Lane authored
    slow-running queries.
    Takahiro Itagaki
Something went wrong with that request. Please try again.