1. 15 Oct, 2011 4 commits
  2. 14 Oct, 2011 4 commits
    • Tom Lane's avatar
      Measure the number of all-visible pages for use in index-only scan costing. · e6858e66
      Tom Lane authored
      Add a column pg_class.relallvisible to remember the number of pages that
      were all-visible according to the visibility map as of the last VACUUM
      (or ANALYZE, or some other operations that update pg_class.relpages).
      Use relallvisible/relpages, instead of an arbitrary constant, to estimate
      how many heap page fetches can be avoided during an index-only scan.
      
      This is pretty primitive and will no doubt see refinements once we've
      acquired more field experience with the index-only scan mechanism, but
      it's way better than using a constant.
      
      Note: I had to adjust an underspecified query in the window.sql regression
      test, because it was changing answers when the plan changed to use an
      index-only scan.  Some of the adjacent tests perhaps should be adjusted
      as well, but I didn't do that here.
      e6858e66
    • Robert Haas's avatar
      Dump all roles first, then all config settings on roles. · dea95c7a
      Robert Haas authored
      This way, if a role's config setting uses the name of another role,
      the validity of the dump isn't dependent on the order in which those
      two roles are dumped.
      
      Code by Phil Sorber, comment by me.
      dea95c7a
    • Robert Haas's avatar
      Avoid potential relcache leak in objectaddress.c. · 393e828e
      Robert Haas authored
      Nobody using the missing_ok flag yet, but let's speculate that this will
      be a better interface for future callers.
      
      KaiGai Kohei, with some adjustments by me.
      393e828e
    • Bruce Momjian's avatar
      Document actual string that has to be returned by the client for MD5 · ad30d366
      Bruce Momjian authored
      authentication.
      
      Report and pseudo code by Cyan Ogilvie
      ad30d366
  3. 13 Oct, 2011 7 commits
  4. 12 Oct, 2011 9 commits
  5. 11 Oct, 2011 8 commits
    • Tom Lane's avatar
      Add comment on why pulling data from a "name" index column can't crash. · 8c8ba6d1
      Tom Lane authored
      It's been bothering me for several days that pretending that the cstring
      data stored in a btree name_ops column is really a "name" Datum could lead
      to reading past the end of memory.  However, given the current memory
      layout used for index-only scans in the btree code, a crash is in fact not
      possible.  Document that so we don't break it.  I have not thought of any
      other solutions that aren't fairly ugly too, and most of them lose the
      functionality of index-only scans on name columns altogether, so this seems
      like the way to go.
      8c8ba6d1
    • Tom Lane's avatar
      Generate index-only scan tuple descriptor from the plan node's indextlist. · cb6771fb
      Tom Lane authored
      Dept. of second thoughts: as long as we've got that tlist hanging around
      anyway, we can apply ExecTypeFromTL to it to get a suitable descriptor for
      the ScanTupleSlot.  This is a nicer solution than the previous one because
      it eliminates some hard-wired knowledge about btree name_ops, and because
      it avoids the somewhat shaky assumption that we needn't set up the scan
      tuple descriptor in EXPLAIN_ONLY mode.  It doesn't change what actually
      happens at run-time though, and I'm still a bit nervous about that.
      cb6771fb
    • Bruce Momjian's avatar
      Improve entab's Makefile install entry. · e991930e
      Bruce Momjian authored
      Andrew Dunstan
      e991930e
    • Bruce Momjian's avatar
      Document that not backing up postmaster.pid and postmaster.opts might · 47cacfc0
      Bruce Momjian authored
      help prevent pg_ctl from getting confused.
      
      Backpatch to 9.1.
      47cacfc0
    • Tom Lane's avatar
      Consider index-only scans even when there is no matching qual or ORDER BY. · 600d3206
      Tom Lane authored
      By popular demand.
      600d3206
    • Tom Lane's avatar
      Rearrange the implementation of index-only scans. · a0185461
      Tom Lane authored
      This commit changes index-only scans so that data is read directly from the
      index tuple without first generating a faux heap tuple.  The only immediate
      benefit is that indexes on system columns (such as OID) can be used in
      index-only scans, but this is necessary infrastructure if we are ever to
      support index-only scans on expression indexes.  The executor is now ready
      for that, though the planner still needs substantial work to recognize
      the possibility.
      
      To do this, Vars in index-only plan nodes have to refer to index columns
      not heap columns.  I introduced a new special varno, INDEX_VAR, to mark
      such Vars to avoid confusion.  (In passing, this commit renames the two
      existing special varnos to OUTER_VAR and INNER_VAR.)  This allows
      ruleutils.c to handle them with logic similar to what we use for subplan
      reference Vars.
      
      Since index-only scans are now fundamentally different from regular
      indexscans so far as their expression subtrees are concerned, I also chose
      to change them to have their own plan node type (and hence, their own
      executor source file).
      a0185461
    • Robert Haas's avatar
      Replace hardcoded switch in object_exists() with a lookup table. · fa351d5a
      Robert Haas authored
      There's no particular advantage to this change on its face; indeed,
      it's possible that this might be slightly slower than the old way.
      But it makes this information more easily accessible to other
      functions, and therefore paves the way for future code consolidation.
      Performance isn't critical here, so there's no need to be smart about
      how we do the search.
      
      This is a heavily cut-down version of a patch from KaiGai Kohei,
      with several fixes by me.  Additional review from Dimitri Fontaine.
      fa351d5a
    • Robert Haas's avatar
      Repair breakage in VirtualXactLock. · e76bcaba
      Robert Haas authored
      I broke this in commit 84e37126.  Report and
      fix by Fujii Masao.
      e76bcaba
  6. 10 Oct, 2011 8 commits