1. 08 Apr, 2011 14 commits
  2. 07 Apr, 2011 8 commits
    • Robert Haas's avatar
      Tweaks for SSI out-of-shared memory behavior. · 56c7140c
      Robert Haas authored
      If we call hash_search() with HASH_ENTER, it will bail out rather than
      return NULL, so it's redundant to check for NULL again in the caller.
      Thus, in cases where we believe it's impossible for the hash table to run
      out of slots anyway, we can simplify the code slightly.
      
      On the flip side, in cases where it's theoretically possible to run out of
      space, we don't want to rely on dynahash.c to throw an error; instead,
      we pass HASH_ENTER_NULL and throw the error ourselves if a NULL comes
      back, so that we can provide a more descriptive error message.
      
      Kevin Grittner
      56c7140c
    • Tom Lane's avatar
      Modernize dlopen interface code for FreeBSD and OpenBSD. · 73d9a908
      Tom Lane authored
      Remove the hard-wired assumption that __mips__ (and only __mips__) lacks
      dlopen in FreeBSD and OpenBSD.  This assumption is outdated at least for
      OpenBSD, as per report from an anonymous 9.1 tester.  We can perfectly well
      use HAVE_DLOPEN instead to decide which code to use.
      
      Some other cosmetic adjustments to make freebsd.c, netbsd.c, and openbsd.c
      exactly alike.
      73d9a908
    • Peter Eisentraut's avatar
      Allow pg_upgrade with PGCLIENTENCODING set · 1eb2231f
      Peter Eisentraut authored
      This used to work, but since PGCLIENTENCODING is now a connection
      option variable, pg_upgrade would prevent it.
      1eb2231f
    • Tom Lane's avatar
      Fix SortTocFromFile() to cope with lines that are too long for its buffer. · 1471a147
      Tom Lane authored
      The original coding supposed that a dump TOC file could never contain lines
      longer than 1K.  The folly of that was exposed by a recent report from
      Per-Olov Esgard.  We only really need to see the first dozen or two bytes
      of each line, since we're just trying to read off the numeric ID at the
      start of the line; so there's no need for a particularly huge buffer.
      What there is a need for is logic to not process continuation bufferloads.
      
      Back-patch to all supported branches, since it's always been like this.
      1471a147
    • Bruce Momjian's avatar
      Preserve pg_largeobject_metadata.relfrozenxid in pg_upgrade. · 82a4f370
      Bruce Momjian authored
      This is needed only in 9.1 because only 9.0 had this and no one is
      upgrading from a 9.0 beta to 9.0 anymore.  We basically don't backpatch
      9.0 beta fixes at this point.
      82a4f370
    • Bruce Momjian's avatar
      e69d3215
    • Tom Lane's avatar
      Fix collations when we call transformWhereClause from outside the parser. · d8d42989
      Tom Lane authored
      Previous patches took care of assorted places that call transformExpr from
      outside the main parser, but I overlooked the fact that some places use
      transformWhereClause as a shortcut for transformExpr + coerce_to_boolean.
      In particular this broke collation-sensitive index WHERE clauses, as per
      report from Thom Brown.  Trigger WHEN and rule WHERE clauses too.
      
      I'm not forcing initdb for this fix, but any affected indexes, triggers,
      or rules will need to be dropped and recreated.
      d8d42989
    • Tom Lane's avatar
      Revise the API for GUC variable assign hooks. · 2594cf0e
      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".
      2594cf0e
  3. 06 Apr, 2011 3 commits
  4. 05 Apr, 2011 5 commits
  5. 04 Apr, 2011 10 commits