1. 14 6月, 2012 9 次提交
    • T
      Stamp library minor versions for 9.3. · 357c5493
      Tom Lane 提交于
      This includes fixing the MSVC copy of ecpg/preproc's version info, which
      seems to have been overlooked repeatedly.  Can't we fix that so there are
      not two copies??
      357c5493
    • T
      Stamp HEAD as 9.3devel. · bed88fce
      Tom Lane 提交于
      Let the hacking begin ...
      bed88fce
    • T
      Revisit error message details for JSON input parsing. · 80edfd76
      Tom Lane 提交于
      Instead of identifying error locations only by line number (which could
      be entirely unhelpful with long input lines), provide a fragment of the
      input text too, placing this info in a new CONTEXT entry.  Make the
      error detail messages conform more closely to style guidelines, fix
      failure to expose some of them for translation, ensure compiler can
      check formats against supplied parameters.
      80edfd76
    • T
      Remove release note entry for reverted patch. · 0f0fba17
      Tom Lane 提交于
      0f0fba17
    • T
      Revert "Reduce checkpoints and WAL traffic on low activity database server" · b8b69d89
      Tom Lane 提交于
      This reverts commit 18fb9d8d.  Per
      discussion, it does not seem like a good idea to allow committed changes to
      go un-checkpointed indefinitely, as could happen in a low-traffic server;
      that makes us entirely reliant on the WAL stream with no redundancy that
      might aid data recovery in case of disk failure.
      
      This re-introduces the original problem of hot-standby setups generating a
      small continuing stream of WAL traffic even when idle, but there are other
      ways to address that without compromising crash recovery, so we'll revisit
      that issue in a future release cycle.
      b8b69d89
    • T
      Fix description of SQL-standard meaning of CREATE LOCAL TEMP TABLE. · 8b23db94
      Tom Lane 提交于
      I had this slightly wrong, as noted by Noah Misch.
      8b23db94
    • T
      Deprecate use of GLOBAL and LOCAL in temp table creation. · c3bc76bd
      Tom Lane 提交于
      Aside from adjusting the documentation to say that these are deprecated,
      we now report a warning (not an error) for use of GLOBAL, since it seems
      fairly likely that we might change that to request SQL-spec-compliant temp
      table behavior in the foreseeable future.  Although our handling of LOCAL
      is equally nonstandard, there is no evident interest in ever implementing
      SQL modules, and furthermore some other products interpret LOCAL as
      behaving the same way we do.  So no expectation of change and no warning
      for LOCAL; but it still seems a good idea to deprecate writing it.
      
      Noah Misch
      c3bc76bd
    • T
      Support Linux's oom_score_adj API as well as the older oom_adj API. · 93f4d7f8
      Tom Lane 提交于
      The simplest way to handle this is just to copy-and-paste the relevant
      code block in fork_process.c, so that's what I did. (It's possible that
      something more complicated would be useful to packagers who want to work
      with either the old or the new API; but at this point the number of such
      people is rapidly approaching zero, so let's just get the minimal thing
      done.)  Update relevant documentation as well.
      93f4d7f8
    • B
      In pg_upgrade, verify that the install user has the same oid on both · b9212e37
      Bruce Momjian 提交于
      clusters, and make sure the new cluster has no additional users.
      
      Backpatch to 9.1.
      b9212e37
  2. 13 6月, 2012 2 次提交
  3. 12 6月, 2012 5 次提交
    • R
      Mark JSON error detail messages for translation. · 36b7e3da
      Robert Haas 提交于
      Per gripe from Tom Lane.
      36b7e3da
    • R
      Copy-editing of release notes. · 99b3135e
      Robert Haas 提交于
      Remove a couple of items that were actually back-patched bug fixes.
      Add additional details to a couple of items which lacked a description.
      Improve attributions for a couple of items I was involved with.
      A few other miscellaneous corrections.
      99b3135e
    • T
      Ensure pg_ctl behaves sanely when data directory is not specified. · 51e61b04
      Tom Lane 提交于
      Commit aaa6e1de introduced multiple hazards
      in the case where pg_ctl is executed with neither a -D switch nor any
      PGDATA environment variable.  It would dump core on machines which are
      unforgiving about printf("%s", NULL), or failing that possibly give a
      rather unhelpful complaint about being unable to execute "postgres -C",
      rather than the logically prior complaint about not being told where the
      data directory is.
      
      Edmund Horner's report suggests that there is another, Windows-specific
      hazard here, but I'm not the person to fix that; it would in any case only
      be significant when trying to use a config-only PGDATA pointer.
      51e61b04
    • T
      Fix pg_dump output to a named tar-file archive. · bf0945e8
      Tom Lane 提交于
      "pg_dump -Ft -f filename ..." got broken by my recent commit
      4317e024, which I fear I only tested
      in the output-to-stdout variant.
      
      Report and fix by Muhammad Asif Naeem.
      bf0945e8
    • P
      pg_receivexlog: Rename option --dir to --directory · 7d754961
      Peter Eisentraut 提交于
      getopt_long() allows abbreviating long options, so we might as well
      give the option the full name, and users can abbreviate it how they
      like.
      
      Do some general polishing of the --help output at the same time.
      7d754961
  4. 11 6月, 2012 4 次提交
  5. 10 6月, 2012 4 次提交
  6. 09 6月, 2012 2 次提交
  7. 08 6月, 2012 8 次提交
    • R
      When using libpq URI syntax, error out on invalid parameter names. · 3b5548a3
      Robert Haas 提交于
      Dan Farina
      3b5548a3
    • P
      Documentation style improvements · f1438cf5
      Peter Eisentraut 提交于
      f1438cf5
    • T
      Scan the buffer pool just once, not once per fork, during relation drop. · ece01aae
      Tom Lane 提交于
      This provides a speedup of about 4X when NBuffers is large enough.
      There is also a useful reduction in sinval traffic, since we
      only do CacheInvalidateSmgr() once not once per fork.
      
      Simon Riggs, reviewed and somewhat revised by Tom Lane
      ece01aae
    • P
      Documentation spell and markup checking · 5baf6da7
      Peter Eisentraut 提交于
      5baf6da7
    • P
      Message style improvements · 5d0109bd
      Peter Eisentraut 提交于
      5d0109bd
    • T
      Do unlocked prechecks in bufmgr.c loops that scan the whole buffer pool. · e8d029a3
      Tom Lane 提交于
      DropRelFileNodeBuffers, DropDatabaseBuffers, FlushRelationBuffers, and
      FlushDatabaseBuffers have to scan the whole shared_buffers pool because
      we have no index structure that would find the target buffers any more
      efficiently than that.  This gets expensive with large NBuffers.  We can
      shave some cycles from these loops by prechecking to see if the current
      buffer is interesting before we acquire the buffer header lock.
      Ordinarily such a test would be unsafe, but in these cases it should be
      safe because we are already assuming that the caller holds a lock that
      prevents any new target pages from being loaded into the buffer pool
      concurrently.  Therefore, no buffer tag should be changing to a value of
      interest, only away from a value of interest.  So a false negative match
      is impossible, while a false positive is safe because we'll recheck after
      acquiring the buffer lock.  Initial testing says that this speeds these
      loops by a factor of 2X to 3X on common Intel hardware.
      
      Patch for DropRelFileNodeBuffers by Jeff Janes (based on an idea of
      Heikki's); extended to the remaining sequential scans by Tom Lane
      e8d029a3
    • S
      Wake WALSender to reduce data loss at failover for async commit. · 2c8a4e9b
      Simon Riggs 提交于
      WALSender now woken up after each background flush by WALwriter, avoiding
      multi-second replication delay for an all-async commit workload.
      Replication delay reduced from 7s with default settings to 200ms and often
      much less, allowing significantly reduced data loss at failover.
      
      Andres Freund and Simon Riggs
      2c8a4e9b
    • R
      Fix more crash-safe visibility map bugs, and improve comments. · b50991ee
      Robert Haas 提交于
      In lazy_scan_heap, we could issue bogus warnings about incorrect
      information in the visibility map, because we checked the visibility
      map bit before locking the heap page, creating a race condition.  Fix
      by rechecking the visibility map bit before we complain.  Rejigger
      some related logic so that we rely on the possibly-outdated
      all_visible_according_to_vm value as little as possible.
      
      In heap_multi_insert, it's not safe to clear the visibility map bit
      before beginning the critical section.  The visibility map is not
      crash-safe unless we treat clearing the bit as a critical operation.
      Specifically, if the transaction were to error out after we set the
      bit and before entering the critical section, we could end up writing
      the heap page to disk (with the bit cleared) and crashing before the
      visibility map page made it to disk.  That would be bad.  heap_insert
      has this correct, but somehow the order of operations got rearranged
      when heap_multi_insert was added.
      
      Also, add some more comments to visibilitymap_test, lazy_scan_heap,
      and IndexOnlyNext, expounding on concurrency issues.
      
      Per extensive code review by Andres Freund, and further review by Tom
      Lane, who also made the original report about the bogus warnings.
      b50991ee
  8. 05 6月, 2012 5 次提交
    • M
      Use strerror(errno) instead of %m · 92135ea0
      Magnus Hagander 提交于
      Found by Fujii Masao
      92135ea0
    • M
      Fix typo · 1e57c2c5
      Magnus Hagander 提交于
      Noted by Erik Rijkers
      1e57c2c5
    • M
      77820120
    • T
      Fix bogus handling of control characters in json_lex_string(). · 3dd8e596
      Tom Lane 提交于
      The original coding misbehaved if "char" is signed, and also made the
      extremely poor decision to print control characters literally when trying
      to complain about them.  Report and patch by Shigeru Hanada.
      
      In passing, also fix core dump risk in report_parse_error() should the
      parse state be something other than what it expects.
      3dd8e596
    • T
      Fix some more bugs in contrib/xml2's xslt_process(). · d9b31e48
      Tom Lane 提交于
      It failed to check for error return from xsltApplyStylesheet(), as reported
      by Peter Gagarinov.  (So far as I can tell, libxslt provides no convenient
      way to get a useful error message in failure cases.  There might be some
      inconvenient way, but considering that this code is deprecated it's hard to
      get enthusiastic about putting lots of work into it.  So I just made it say
      "failed to apply stylesheet", in line with the existing error checks.)
      
      While looking at the code I also noticed that the string returned by
      xsltSaveResultToString was never freed, resulting in a session-lifespan
      memory leak.
      
      Back-patch to all supported versions.
      d9b31e48
  9. 03 6月, 2012 1 次提交
    • T
      Fix memory leaks in failure paths in buildACLCommands and parseAclItem. · d73b7f97
      Tom Lane 提交于
      This is currently only cosmetic, since all the call sites just curl up
      and die in event of a failure return.  It might be important for some
      future use-case, though, and in any case it quiets warnings from the
      clang static analyzer (as reported by Anna Zaks).
      
      Josh Kupershmidt
      d73b7f97