1. 06 Jul, 2012 3 commits
  2. 05 Jul, 2012 9 commits
    • Tom Lane's avatar
      Don't try to trim "../" in join_path_components(). · 85254199
      Tom Lane authored
      join_path_components() tried to remove leading ".." components from its
      tail argument, but it was not nearly bright enough to do so correctly
      unless the head argument was (a) absolute and (b) canonicalized.
      Rather than try to fix that logic, let's just get rid of it: there is no
      correctness reason to remove "..", and cosmetic concerns can be taken
      care of by a subsequent canonicalize_path() call.  Per bug #6715 from
      Greg Davidson.
      
      Back-patch to all supported branches.  It appears that pre-9.2, this
      function is only used with absolute paths as head arguments, which is why
      we'd not noticed the breakage before.  However, third-party code might be
      expecting this function to work in more general cases, so it seems wise
      to back-patch.
      
      In HEAD and 9.2, also make some minor cosmetic improvements to callers.
      85254199
    • Heikki Linnakangas's avatar
      Revert part of the previous patch that avoided using PLy_elog(). · de479e2e
      Heikki Linnakangas authored
      That caused the plpython_unicode regression test to fail on SQL_ASCII
      encoding, as evidenced by the buildfarm. The reason is that with the patch,
      you don't get the detail in the error message that you got before. That
      detail is actually very informative, so rather than just adjust the expected
      output, let's revert that part of the patch for now to make the buildfarm
      green again, and figure out some other way to avoid the recursion of
      PLy_elog() that doesn't lose the detail.
      de479e2e
    • Heikki Linnakangas's avatar
      Fix mapping of PostgreSQL encodings to Python encodings. · b66de4c6
      Heikki Linnakangas authored
      Windows encodings, "win1252" and so forth, are named differently in Python,
      like "cp1252". Also, if the PyUnicode_AsEncodedString() function call fails
      for some reason, use a plain ereport(), not a PLy_elog(), to report that
      error. That avoids recursion and crash, if PLy_elog() tries to call
      PLyUnicode_Bytes() again.
      
      This fixes bug reported by Asif Naeem. Backpatch down to 9.0, before that
      plpython didn't even try these conversions.
      
      Jan Urbański, with minor comment improvements by me.
      b66de4c6
    • Tom Lane's avatar
      Remove support for using wait3() in place of waitpid(). · fc548b22
      Tom Lane authored
      All Unix-oid platforms that we currently support should have waitpid(),
      since it's in V2 of the Single Unix Spec.  Our git history shows that
      the wait3 code was added to support NextStep, which we officially dropped
      support for as of 9.2.  So get rid of the configure test, and simplify the
      macro spaghetti in reaper().  Per suggestion from Fujii Masao.
      fc548b22
    • Alvaro Herrera's avatar
      pg_upgrade: abstract out copying of files from old cluster to new · 666d494d
      Alvaro Herrera authored
      Currently only pg_clog is copied, but some other directories could need
      the same treatment as well, so create a subroutine to do it.
      
      Extracted from my (somewhat larger) FOR KEY SHARE patch.
      666d494d
    • Magnus Hagander's avatar
      Fix function argument tab completion for schema-qualified or quoted function names · 3644a639
      Magnus Hagander authored
      Dean Rasheed, reviewed by Josh Kupershmidt
      3644a639
    • Bruce Momjian's avatar
      Fix missing regex slash that caused perltidy to get confused on · 539d3875
      Bruce Momjian authored
      copyright.pl.
      
      Backpatch to 9.2.
      539d3875
    • Bruce Momjian's avatar
      Run newly-configured perltidy script on Perl files. · 042d9ffc
      Bruce Momjian authored
      Run on HEAD and 9.2.
      042d9ffc
    • Robert Haas's avatar
      Reduce messages about implicit indexes and sequences to DEBUG1. · d7c73484
      Robert Haas authored
      Per recent discussion on pgsql-hackers, these messages are too
      chatty for most users.
      d7c73484
  3. 04 Jul, 2012 14 commits
  4. 03 Jul, 2012 4 commits
  5. 02 Jul, 2012 7 commits
    • Robert Haas's avatar
      Fix a stupid bug I introduced into XLogFlush(). · 3cf39e6d
      Robert Haas authored
      Commit f11e8be3 broke this; it was right
      in Peter's original patch, but I messed it up before committing.
      3cf39e6d
    • Robert Haas's avatar
      Fix position of WalSndWakeupRequest call. · 3bb592bb
      Robert Haas authored
      This avoids discriminating against wal_sync_method = open_sync or
      open_datasync.
      
      Fujii Masao, reviewed by Andres Freund
      3bb592bb
    • Peter Eisentraut's avatar
      Assorted message style improvements · 2b443063
      Peter Eisentraut authored
      2b443063
    • Tom Lane's avatar
      Fix to_date's handling of year 519. · 41f4a0ab
      Tom Lane authored
      A thinko in commit 029dfdf1 caused the year
      519 to be handled differently from either adjacent year, which was not the
      intention AFAICS.  Report and diagnosis by Marc Cousin.
      
      In passing, remove redundant re-tests of year value.
      41f4a0ab
    • Robert Haas's avatar
      Work a little harder on comments for walsender wakeup patch. · 82cdd2df
      Robert Haas authored
      Per gripe from Tom Lane.
      82cdd2df
    • Robert Haas's avatar
      Make commit_delay much smarter. · f11e8be3
      Robert Haas authored
      Instead of letting every backend participating in a group commit wait
      independently, have the first one that becomes ready to flush WAL wait
      for the configured delay, and let all the others wait just long enough
      for that first process to complete its flush.  This greatly increases
      the chances of being able to configure a commit_delay setting that
      actually improves performance.
      
      As a side consequence of this change, commit_delay now affects all WAL
      flushes, rather than just commits.  There was some discussion on
      pgsql-hackers about whether to rename the GUC to, say, wal_flush_delay,
      but in the absence of consensus I am leaving it alone for now.
      
      Peter Geoghegan, with some changes, mostly to the documentation, by me.
      f11e8be3
    • Robert Haas's avatar
      Make walsender more responsive. · f83b5999
      Robert Haas authored
      Per testing by Andres Freund, this improves replication performance
      and reduces replication latency and latency jitter.  I was a bit
      concerned about moving more work into XLogInsert, but testing seems
      to show that it's not a problem in practice.
      
      Along the way, improve comments for WaitLatchOrSocket.
      
      Andres Freund.  Review and stylistic cleanup by me.
      f83b5999
  6. 01 Jul, 2012 2 commits
    • Tom Lane's avatar
      Fix race condition in enum value comparisons. · 9ad45c18
      Tom Lane authored
      When (re) loading the typcache comparison cache for an enum type's values,
      use an up-to-date MVCC snapshot, not the transaction's existing snapshot.
      This avoids problems if we encounter an enum OID that was created since our
      transaction started.  Per report from Andres Freund and diagnosis by Robert
      Haas.
      
      To ensure this is safe even if enum comparison manages to get invoked
      before we've set a transaction snapshot, tweak GetLatestSnapshot to
      redirect to GetTransactionSnapshot instead of throwing error when
      FirstSnapshotSet is false.  The existing uses of GetLatestSnapshot (in
      ri_triggers.c) don't care since they couldn't be invoked except in a
      transaction that's already done some work --- but it seems just conceivable
      that this might not be true of enums, especially if we ever choose to use
      enums in system catalogs.
      
      Note that the comparable coding in enum_endpoint and enum_range_internal
      remains GetTransactionSnapshot; this is perhaps debatable, but if we
      changed it those functions would have to be marked volatile, which doesn't
      seem attractive.
      
      Back-patch to 9.1 where ALTER TYPE ADD VALUE was added.
      9ad45c18
    • Tom Lane's avatar
      Suppress compiler warnings in readfuncs.c. · 39bfc94c
      Tom Lane authored
      Commit 7357558f introduced "(void) token;"
      into the READ_TEMP_LOCALS() macro, to suppress complaints from gcc 4.6
      when the value of token was not used anywhere in a particular node-read
      function.  However, this just moved the warning around: inspection of
      buildfarm results shows that some compilers are now complaining that token
      is being read before it's set.  Revert the READ_TEMP_LOCALS() macro change
      and instead put "(void) token;" into READ_NODE_FIELD(), which is the
      principal culprit for cases where the warning might occur.  In principle we
      might need the same in READ_BITMAPSET_FIELD() and/or READ_LOCATION_FIELD(),
      but it seems unlikely that a node would consist only of such fields, so
      I'll leave them alone for now.
      39bfc94c
  7. 30 Jun, 2012 1 commit