1. 08 Sep, 2011 1 commit
  2. 07 Sep, 2011 12 commits
  3. 06 Sep, 2011 13 commits
  4. 05 Sep, 2011 7 commits
  5. 04 Sep, 2011 7 commits
    • Tom Lane's avatar
      Change get_variable_numdistinct's API to flag default estimates explicitly. · 4c2777d0
      Tom Lane authored
      Formerly, callers tested for DEFAULT_NUM_DISTINCT, which had the problem
      that a perfectly solid estimate might be mistaken for a content-free
      default.
      4c2777d0
    • Tom Lane's avatar
      Dig down into sub-selects to look for column statistics. · 1cb108ef
      Tom Lane authored
      If a sub-select's output column is a simple Var, recursively look for
      statistics applying to that Var, and use them if available.  The need for
      this was foreseen ages ago, but we didn't have enough infrastructure to do
      it with reasonable speed until just now.
      
      We punt and stick with default estimates if the subquery uses set
      operations, GROUP BY, or DISTINCT, since those operations would change the
      underlying column statistics (particularly, the relative frequencies of
      different values) beyond recognition.  This means that the types of
      sub-selects for which this improvement applies are fairly limited, since
      most subqueries satisfying those restrictions would have gotten flattened
      into the parent query anyway.  But it does help for some cases, such as
      subqueries with ORDER BY or LIMIT.
      1cb108ef
    • Tom Lane's avatar
      Can't print PlannerGlobal's subroots list in outfuncs. · 698df335
      Tom Lane authored
      Since the subroots will surely link back to the same glob struct, this
      necessarily leads to infinite recursion.  Doh.  Found while trying to
      debug some other code.
      698df335
    • Tom Lane's avatar
      Clean up the #include mess a little. · 1609797c
      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.
      1609797c
    • Tom Lane's avatar
      Remove unnecessary and circular #include. · f116b1f5
      Tom Lane authored
      storage/proc.h should not include replication/syncrep.h, especially not
      when the latter includes storage/proc.h; but in any case this was a pretty
      poor thing from a modular layering standpoint.
      f116b1f5
    • Bruce Momjian's avatar
      walsender.h doesn't need xlog.h, per Tom. · 5bce637a
      Bruce Momjian authored
      5bce637a
    • Bruce Momjian's avatar
      Move AllowCascadeReplication() define from xlog.h to replication include · 85e6e166
      Bruce Momjian authored
      file.
      
      Per suggestion from Alvaro.
      85e6e166