1. 20 Oct, 2014 1 commit
  2. 19 Oct, 2014 3 commits
  3. 18 Oct, 2014 6 commits
    • Bruce Momjian's avatar
      Shorten warning about hash creation · b87671f1
      Bruce Momjian authored
      Also document that PITR is also affected.
      b87671f1
    • Bruce Momjian's avatar
      interval: tighten precision specification · 417f9248
      Bruce Momjian authored
      interval precision can only be specified after the "interval" keyword if
      no units are specified.
      
      Previously we incorrectly checked the units to see if the precision was
      legal, causing confusion.
      
      Report by Alvaro Herrera
      417f9248
    • Bruce Momjian's avatar
      doc: restrictions on alter database moving default tablespace · 97d55487
      Bruce Momjian authored
      Mention tablespace must be empty and no one connected to the database.
      
      Report by Josh Berkus
      97d55487
    • Peter Eisentraut's avatar
      doc: Clean up pg_recvlogical reference page · 52c1ae22
      Peter Eisentraut authored
      This needed a general cleanup of wording, typos, outdated terminology,
      formatting, and hard-to-understand and borderline incorrect information.
      
      Also tweak the pg_receivexlog page a bit to make the two more
      consistent.
      52c1ae22
    • Tom Lane's avatar
      Declare mkdtemp() only if we're providing it. · 60f8133d
      Tom Lane authored
      Follow our usual style of providing an "extern" for a standard library
      function only when we're also providing the implementation.  This avoids
      issues when the system headers declare the function slightly differently
      than we do, as noted by Caleb Welton.
      
      We might have to go to the extent of probing to see if the system headers
      declare the function, but let's not do that until it's demonstrated to be
      necessary.
      
      Oversight in commit 9e6b1bf2.  Back-patch
      to all supported branches, as that was.
      60f8133d
    • Tom Lane's avatar
      Avoid core dump in _outPathInfo() for Path without a parent RelOptInfo. · 5ba062ee
      Tom Lane authored
      Nearly all Paths have parents, but a ResultPath representing an empty FROM
      clause does not.  Avoid a core dump in such cases.  I believe this is only
      a hazard for debugging usage, not for production, else we'd have heard
      about it before.  Nonetheless, back-patch to 9.1 where the troublesome code
      was introduced.  Noted while poking at bug #11703.
      5ba062ee
  4. 17 Oct, 2014 4 commits
    • Fujii Masao's avatar
      Fix bug in handling of connections that pg_receivexlog creates. · 504c7175
      Fujii Masao authored
      Previously pg_receivexlog created new connection for WAL streaming
      even though another connection which had been established to create
      or delete the replication slot was being left. This caused the unused
      connection to be left uselessly until pg_receivexlog exited.
      This bug was introduced by the commit d9f38c7a.
      
      This patch changes pg_receivexlog so that the connection for
      the replication slot is reused for WAL streaming.
      
      Andres Freund, slightly modified by me, reviewed by Michael Paquier
      504c7175
    • Tom Lane's avatar
      Fix core dump in pg_dump --binary-upgrade on zero-column composite type. · 5c38a1d4
      Tom Lane authored
      This reverts nearly all of commit 28f6cab6
      in favor of just using the typrelid we already have in pg_dump's TypeInfo
      struct for the composite type.  As coded, it'd crash if the composite type
      had no attributes, since then the query would return no rows.
      
      Back-patch to all supported versions.  It seems to not really be a problem
      in 9.0 because that version rejects the syntax "create type t as ()", but
      we might as well keep the logic similar in all affected branches.
      
      Report and fix by Rushabh Lathia.
      5c38a1d4
    • Tom Lane's avatar
      Re-pgindent src/bin/pg_dump/*. · 7584649a
      Tom Lane authored
      Seems to have gotten rather messy lately, as a consequence of a couple
      of large recent commits.
      7584649a
    • Stephen Frost's avatar
      Fix pg_dump for UPDATE policies · 389573fd
      Stephen Frost authored
      pg_dump had the wrong character for update and so was failing when
      attempts were made to pg_dump databases with UPDATE policies.
      
      Pointed out by Fujii Masao (thanks!)
      389573fd
  5. 16 Oct, 2014 1 commit
    • Tom Lane's avatar
      Support timezone abbreviations that sometimes change. · b2cbced9
      Tom Lane authored
      Up to now, PG has assumed that any given timezone abbreviation (such as
      "EDT") represents a constant GMT offset in the usage of any particular
      region; we had a way to configure what that offset was, but not for it
      to be changeable over time.  But, as with most things horological, this
      view of the world is too simplistic: there are numerous regions that have
      at one time or another switched to a different GMT offset but kept using
      the same timezone abbreviation.  Almost the entire Russian Federation did
      that a few years ago, and later this month they're going to do it again.
      And there are similar examples all over the world.
      
      To cope with this, invent the notion of a "dynamic timezone abbreviation",
      which is one that is referenced to a particular underlying timezone
      (as defined in the IANA timezone database) and means whatever it currently
      means in that zone.  For zones that use or have used daylight-savings time,
      the standard and DST abbreviations continue to have the property that you
      can specify standard or DST time and get that time offset whether or not
      DST was theoretically in effect at the time.  However, the abbreviations
      mean what they meant at the time in question (or most recently before that
      time) rather than being absolutely fixed.
      
      The standard abbreviation-list files have been changed to use this behavior
      for abbreviations that have actually varied in meaning since 1970.  The
      old simple-numeric definitions are kept for abbreviations that have not
      changed, since they are a bit faster to resolve.
      
      While this is clearly a new feature, it seems necessary to back-patch it
      into all active branches, because otherwise use of Russian zone
      abbreviations is going to become even more problematic than it already was.
      This change supersedes the changes in commit 513d06de et al to modify the
      fixed meanings of the Russian abbreviations; since we've not shipped that
      yet, this will avoid an undesirably incompatible (not to mention incorrect)
      change in behavior for timestamps between 2011 and 2014.
      
      This patch makes some cosmetic changes in ecpglib to keep its usage of
      datetime lookup tables as similar as possible to the backend code, but
      doesn't do anything about the increasingly obsolete set of timezone
      abbreviation definitions that are hard-wired into ecpglib.  Whatever we
      do about that will likely not be appropriate material for back-patching.
      Also, a potential free() of a garbage pointer after an out-of-memory
      failure in ecpglib has been fixed.
      
      This patch also fixes pre-existing bugs in DetermineTimeZoneOffset() that
      caused it to produce unexpected results near a timezone transition, if
      both the "before" and "after" states are marked as standard time.  We'd
      only ever thought about or tested transitions between standard and DST
      time, but that's not what's happening when a zone simply redefines their
      base GMT offset.
      
      In passing, update the SGML documentation to refer to the Olson/zoneinfo/
      zic timezone database as the "IANA" database, since it's now being
      maintained under the auspices of IANA.
      b2cbced9
  6. 15 Oct, 2014 1 commit
    • Tom Lane's avatar
      Print planning time only in EXPLAIN ANALYZE, not plain EXPLAIN. · 90063a76
      Tom Lane authored
      We've gotten enough push-back on that change to make it clear that it
      wasn't an especially good idea to do it like that.  Revert plain EXPLAIN
      to its previous behavior, but keep the extra output in EXPLAIN ANALYZE.
      Per discussion.
      
      Internally, I set this up as a separate flag ExplainState.summary that
      controls printing of planning time and execution time.  For now it's
      just copied from the ANALYZE option, but we could consider exposing it
      to users.
      90063a76
  7. 14 Oct, 2014 7 commits
    • Alvaro Herrera's avatar
      Blind attempt at fixing Win32 pg_dump issues · 076d29a1
      Alvaro Herrera authored
      Per buildfarm failures
      076d29a1
    • Alvaro Herrera's avatar
      pg_dump: Reduce use of global variables · 0eea8047
      Alvaro Herrera authored
      Most pg_dump.c global variables, which were passed down individually to
      dumping routines, are now grouped as members of the new DumpOptions
      struct, which is used as a local variable and passed down into routines
      that need it.  This helps future development efforts; in particular it
      is said to enable a mode in which a parallel pg_dump run can output
      multiple streams, and have them restored in parallel.
      
      Also take the opportunity to clean up the pg_dump header files somewhat,
      to avoid circularity.
      
      Author: Joachim Wieland, revised by Álvaro Herrera
      Reviewed by Peter Eisentraut
      0eea8047
    • Heikki Linnakangas's avatar
      Fix deadlock with LWLockAcquireWithVar and LWLockWaitForVar. · e0d97d77
      Heikki Linnakangas authored
      LWLockRelease should release all backends waiting with LWLockWaitForVar,
      even when another backend has already been woken up to acquire the lock,
      i.e. when releaseOK is false. LWLockWaitForVar can return as soon as the
      protected value changes, even if the other backend will acquire the lock.
      Fix that by resetting releaseOK to true in LWLockWaitForVar, whenever
      adding itself to the wait queue.
      
      This should fix the bug reported by MauMau, where the system occasionally
      hangs when there is a lot of concurrent WAL activity and a checkpoint.
      Backpatch to 9.4, where this code was added.
      e0d97d77
    • Heikki Linnakangas's avatar
      Fix typo in docs. · 0ff5047d
      Heikki Linnakangas authored
      Shigeru Hanada
      0ff5047d
    • Peter Eisentraut's avatar
      doc: Improve ALTER VIEW / SET documentation · db75e524
      Peter Eisentraut authored
      The way the ALTER VIEW / SET options were listed in the synopsis was
      very confusing.  Move the list to the main description, similar to how
      the ALTER TABLE reference page does it.
      db75e524
    • Peter Eisentraut's avatar
      doc: Fix copy-and-paste mistakes · 5dc4b50b
      Peter Eisentraut authored
      5dc4b50b
    • Peter Eisentraut's avatar
      psql: Fix \? output alignment · 7ce09e61
      Peter Eisentraut authored
      This was inadvertently changed in commit c64e68fd.
      7ce09e61
  8. 13 Oct, 2014 11 commits
  9. 12 Oct, 2014 2 commits
    • Peter Eisentraut's avatar
      pg_recvlogical: Improve --help output · a0fb59d8
      Peter Eisentraut authored
      List the actions first, as they are the most important options.  Group
      the other options more sensibly, consistent with the man page.  Correct
      a few typographical errors, clarify some things.
      
      Also update the pg_receivexlog --help output to make it a bit more
      consistent with that of pg_recvlogical.
      a0fb59d8
    • Peter Eisentraut's avatar
      Message improvements · b7a08c80
      Peter Eisentraut authored
      b7a08c80
  10. 11 Oct, 2014 4 commits