1. 20 Oct, 2011 3 commits
  2. 19 Oct, 2011 5 commits
  3. 18 Oct, 2011 3 commits
    • Tom Lane's avatar
      Remove unnecessary AssertMacro() to suppress gcc 4.6 compiler warning. · 7c19e044
      Tom Lane authored
      There's no particular value in doing AssertMacro((tup) != NULL) in front
      of code that's certain to crash anyway if tup is NULL.  And if "tup" is
      actually the address of a local variable, gcc 4.6 whinges about it.  That's
      arguably pretty broken on gcc's part, but we might as well remove the
      useless test to silence the warnings.  This gets rid of all the -Waddress
      warnings in the backend; there are some in libpq and psql that are a bit
      harder to avoid.
      7c19e044
    • Tom Lane's avatar
      Fix pg_dump to dump casts between auto-generated types. · b246207b
      Tom Lane authored
      The heuristic for when to dump a cast failed for a cast between table
      rowtypes, as reported by Frédéric Rejol.  Fix it by setting
      the "dump" flag for such a type the same way as the flag is set for the
      underlying table or base type.  This won't result in the auto-generated
      type appearing in the output, since setting its objType to DO_DUMMY_TYPE
      unconditionally suppresses that.  But it will result in dumpCast doing what
      was intended.
      
      Back-patch to 8.3.  The 8.2 code is rather different in this area, and it
      doesn't seem worth any risk to fix a corner case that nobody has stumbled
      on before.
      b246207b
    • Magnus Hagander's avatar
      Exclude postmaster.opts from base backups · d1e25b78
      Magnus Hagander authored
      Noted by Fujii Masao
      d1e25b78
  4. 16 Oct, 2011 3 commits
    • Tom Lane's avatar
      Avoid assuming that index-only scan data matches the index's rowtype. · 336c1d7a
      Tom Lane authored
      In general the data returned by an index-only scan should have the
      datatypes originally computed by FormIndexDatum.  If the index opclasses
      use "storage" datatypes different from their input datatypes, the scan
      tuple will not have the same rowtype attributed to the index; but we had
      a hard-wired assumption that that was true in nodeIndexonlyscan.c.  We'd
      already hacked around the issue for the one case where the types are
      different in btree indexes (btree name_ops), but this would definitely
      come back to bite us if we ever implement index-only scans in GiST.
      
      To fix, require the index AM to explicitly provide the tupdesc for the
      tuple it is returning.  btree can just pass back the index's tupdesc, but
      GiST will have to work harder when and if it supports index-only scans.
      
      I had previously proposed fixing this by allowing the index AM to fill the
      scan tuple slot directly; but on reflection that seemed like a module
      layering violation, since TupleTableSlots are creatures of the executor.
      At least in the btree case, it would also be less efficient, since the
      tuple deconstruction work would occur even for rows later found to be
      invisible to the scan's snapshot.
      336c1d7a
    • Tom Lane's avatar
      Fix collate.linux.utf8 expected output for recent error message change. · e661c3df
      Tom Lane authored
      Noted by Jeff Davis.
      e661c3df
    • Tom Lane's avatar
      Teach btree to handle ScalarArrayOpExpr quals natively. · 9e8da0f7
      Tom Lane authored
      This allows "indexedcol op ANY(ARRAY[...])" conditions to be used in plain
      indexscans, and particularly in index-only scans.
      9e8da0f7
  5. 15 Oct, 2011 5 commits
  6. 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
  7. 13 Oct, 2011 7 commits
  8. 12 Oct, 2011 9 commits
  9. 11 Oct, 2011 1 commit
    • 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