1. 18 Sep, 2019 5 commits
  2. 17 Sep, 2019 3 commits
  3. 16 Sep, 2019 2 commits
  4. 15 Sep, 2019 3 commits
  5. 14 Sep, 2019 3 commits
  6. 13 Sep, 2019 7 commits
  7. 12 Sep, 2019 8 commits
  8. 11 Sep, 2019 4 commits
    • Tom Lane's avatar
      Rearrange postmaster's startup sequence for better syslogger results. · 9a86f03b
      Tom Lane authored
      This is a second try at what commit 57431a91 tried to do, namely,
      launch the syslogger before we open postmaster sockets so that our
      messages about the sockets end up in the syslogger files.  That
      commit fell foul of a bunch of subtle issues caused by trying to
      launch a postmaster child process before creating shared memory.
      Rather than messing with that interaction, let's postpone opening
      the sockets till after we launch the syslogger.
      
      This would not have been terribly safe before commit 7de19fbc,
      because we relied on socket opening to detect whether any competing
      postmasters were using the same port number.  But now that we choose
      IPC keys without regard to the port number, there's no interaction
      to worry about.
      
      Also delay creation of the external PID file (if requested) till after
      the sockets are open, since external code could plausibly be relying
      on that ordering of events.  And postpone most of the work of
      RemovePgTempFiles() so that that potentially-slow processing still
      happens after we make the external PID file.  We have to be a bit
      careful about that last though: as noted in the discussion subsequent to
      bug #15804, EXEC_BACKEND builds still have to clear the parameter-file
      temp dir before launching the syslogger.
      
      Patch by me; thanks to Michael Paquier for review/testing.
      
      Discussion: https://postgr.es/m/15804-3721117bf40fb654@postgresql.org
      9a86f03b
    • Alvaro Herrera's avatar
      libpq docs: be clearer about conninfo's 'hostaddr' · 75f46eae
      Alvaro Herrera authored
      The previous wording was a bit too terse, too vague on the subject of
      'host' and 'hostaddr' in connection specifications, which has caused
      people to waste time trying to conform to rules because of
      misunderstanding the whole thing; this small change should make things
      clearer.
      
      Author: Robert Haas, stemming from Fabien Coelho's complaints
      Discussion: https://postgr.es/m/alpine.DEB.2.21.1808201323020.13832@lancre
      75f46eae
    • Michael Paquier's avatar
      Fix comment in psql's describe.c · 8a0deae8
      Michael Paquier authored
      Procedures are supported since v11 and \dfp can be used since this
      version, but it was not mentioned as a supported option in the
      description of describeFunctions() which handles \df in psql.
      
      Extracted from a larger patch.
      
      Author: Fabien Coelho
      Discussion: https://postgr.es/m/alpine.DEB.2.21.1908281618520.28828@lancre
      8a0deae8
    • Michael Paquier's avatar
      Expand properly list of TAP tests used for prove in vcregress.pl · 9d6e1ec5
      Michael Paquier authored
      Depending on the system used, t/*.pl may not be expanded into a list of
      tests which can be consumed by prove when attempting to run TAP tests on
      a given path.  Fix that by using glob() directly in the script, to make
      sure that a complete list of tests is provided.  This has not proved to
      be an issue with MSVC as the list was properly expanded, but it is on
      Linux with perl's system().
      
      This is extracted from a larger patch.
      
      Author: Tom Lane
      Discussion: https://postgr.es/m/6628.1567958876@sss.pgh.pa.us
      Backpatch-through: 9.4
      9d6e1ec5
  9. 10 Sep, 2019 4 commits
    • Tomas Vondra's avatar
      Allow setting statistics target for extended statistics · d06215d0
      Tomas Vondra authored
      When building statistics, we need to decide how many rows to sample and
      how accurate the resulting statistics should be. Until now, it was not
      possible to explicitly define statistics target for extended statistics
      objects, the value was always computed from the per-attribute targets
      with a fallback to the system-wide default statistics target.
      
      That's a bit inconvenient, as it ties together the statistics target set
      for per-column and extended statistics. In some cases it may be useful
      to require larger sample / higher accuracy for extended statics (or the
      other way around), but with this approach that's not possible.
      
      So this commit introduces a new command, allowing to specify statistics
      target for individual extended statistics objects, overriding the value
      derived from per-attribute targets (and the system default).
      
        ALTER STATISTICS stat_name SET STATISTICS target_value;
      
      When determining statistics target for an extended statistics object we
      first look at this explicitly set value. When this value is -1, we fall
      back to the old formula, looking at the per-attribute targets first and
      then the system default. This means the behavior is backwards compatible
      with older PostgreSQL releases.
      
      Author: Tomas Vondra
      Discussion: https://postgr.es/m/20190618213357.vli3i23vpkset2xd@development
      Reviewed-by: Kirk Jamison, Dean Rasheed
      d06215d0
    • Tom Lane's avatar
      Reduce overhead of scanning the backend[] array in LISTEN/NOTIFY. · bca6e643
      Tom Lane authored
      Up to now, async.c scanned its whole array of per-backend state
      whenever it needed to find listening backends.  That's expensive
      if MaxBackends is large, so extend the data structure with list
      links that thread the active entries together.
      
      A downside of this change is that asyncQueueUnregister (unregister
      a listening backend at backend exit) now requires exclusive not shared
      lock, and it can take awhile if there are many other listening
      backends.  We could improve the latter issue by using a doubly- not
      singly-linked list, but it's probably not worth the storage space;
      typical usage patterns for LISTEN/NOTIFY have fairly long-lived
      listeners.
      
      In return for that, Exec_ListenPreCommit (initially register a
      listening backend), SignalBackends, and asyncQueueAdvanceTail
      get significantly faster when MaxBackends is much larger than
      the number of listening backends.  If most of the potential
      backend slots are listening, we don't win, but that's a case
      where the actual interprocess-signal overhead is going to swamp
      these considerations anyway.
      
      Martijn van Oosterhout, hacked a bit more by me
      
      Discussion: https://postgr.es/m/CADWG95vtRBFDdrx1JdT1_9nhOFw48KaeTev6F_LtDQAFVpSPhA@mail.gmail.com
      bca6e643
    • Alvaro Herrera's avatar
      Fix unaccent generation script in Windows · 0afc0a78
      Alvaro Herrera authored
      As originally coded, the script would fail on Windows 10 and Python 3
      because stdout would not be switched to UTF-8 only for Python 2.  This
      patch makes that apply to both versions.
      
      Also add python 2 compatibility markers so that we know what to remove
      once we drop support for that.  Also use a "with" clause to ensure file
      descriptor is closed promptly.
      
      Author: Hugh Ranalli, Ramanarayana
      Reviewed-by: Kyotaro Horiguchi
      Discussion: https://postgr.es/m/CAKm4Xs7_61XMyOWmHs3n0mmkS0O4S0pvfWk=7cQ5P0gs177f7A@mail.gmail.com
      Discussion: https://postgr.es/m/15548-cef1b3f8de190d4f@postgresql.org
      0afc0a78
    • Alvaro Herrera's avatar
      Restructure libpq code to remove some duplicity · b438e7e7
      Alvaro Herrera authored
      There was some duplicate code to run SHOW transaction_read_only to
      determine whether the server is read-write or read-only.  Reduce it by
      adding another state to the state machine.
      
      Author: Hari Babu Kommi
      Reviewed-by: Takayuki Tsunakawa, Álvaro Herrera
      Discussion: https://postgr.es/m/CAJrrPGe_qgdbbN+yBgEVpd+YLHXXjTruzk6RmTMhqrFig+32ag@mail.gmail.com
      b438e7e7
  10. 09 Sep, 2019 1 commit
    • Peter Geoghegan's avatar
      Add _bt_binsrch() scantid assertion to nbtree. · 55d015bd
      Peter Geoghegan authored
      Assert that _bt_binsrch() binary searches with scantid set in insertion
      scankey cannot be performed on leaf pages.  Leaf-level binary searches
      where scantid is set must use _bt_binsrch_insert() instead.
      
      _bt_binsrch_insert() is likely to have additional responsibilities in
      the future, such as searching within GIN-style posting lists using
      scantid.  It seems like a good idea to tighten things up now.
      55d015bd