1. 20 Aug, 2014 1 commit
  2. 19 Aug, 2014 7 commits
    • Fujii Masao's avatar
      Revert "Fix bug in checking of IDENTIFY_SYSTEM result." · c4762886
      Fujii Masao authored
      This reverts commit 083d29c6.
      
      The commit changed the code so that it causes an errors when
      IDENTIFY_SYSTEM returns three columns. But which prevents us
      from using the replication-related utilities against the server
      with older version. This is not what we want. For that
      compatibility, we allow the utilities to receive three columns
      as the result of IDENTIFY_SYSTEM eventhough it actually returns
      four columns in 9.4 or later.
      
      Pointed out by Andres Freund.
      c4762886
    • Fujii Masao's avatar
      Fix bug in checking of IDENTIFY_SYSTEM result. · 083d29c6
      Fujii Masao authored
      5a991ef8 added new column into
      the result of IDENTIFY_SYSTEM command. But it was not reflected into
      several codes checking that result. Specifically though the number of
      columns in the result was increased to 4, it was still compared with 3
      in some replication codes.
      
      Back-patch to 9.4 where the number of columns in IDENTIFY_SYSTEM
      result was increased.
      
      Report from Michael Paquier
      083d29c6
    • Noah Misch's avatar
      Install libpq DLL with $(INSTALL_SHLIB). · 8605bc75
      Noah Misch authored
      Programs need execute permission on a DLL file to load it.  MSYS
      "install" ignores the mode argument, and our Cygwin build statically
      links libpq into programs.  That explains the lack of buildfarm trouble.
      Back-patch to 9.0 (all supported versions).
      8605bc75
    • Noah Misch's avatar
      Finish adding file version information to installed Windows binaries. · ee9569e4
      Noah Misch authored
      In support of this, have the MSVC build follow GNU make in preferring
      GNUmakefile over Makefile when a directory contains both.
      
      Michael Paquier, reviewed by MauMau.
      ee9569e4
    • Noah Misch's avatar
      Replace a few strncmp() calls with strlcpy(). · fb2aece8
      Noah Misch authored
      strncmp() is a specialized API unsuited for routine copying into
      fixed-size buffers.  On a system where the length of a single filename
      can exceed MAXPGPATH, the pg_archivecleanup change prevents a simple
      crash in the subsequent strlen().  Few filesystems support names that
      long, and calling pg_archivecleanup with untrusted input is still not a
      credible use case.  Therefore, no back-patch.
      
      David Rowley
      fb2aece8
    • Noah Misch's avatar
      Make pg_service.conf sample LDIF more portable. · 7fc5f1a3
      Noah Misch authored
      The aboriginal sample placed connection parameters in
      groupOfUniqueNames/uniqueMember.  OpenLDAP, at least as early as version
      2.4.23, rejects uniqueMember entries that do not conform to the syntax
      for a distinguished name.  Use device/description, which is free-form.
      Back-patch to 9.4 for web site visibility.
      7fc5f1a3
    • Noah Misch's avatar
      Document new trigger-related forms of ALTER FOREIGN TABLE. · 10718612
      Noah Misch authored
      Oversight in commit 7cbe57c3.
      Back-patch to 9.4, where that commit first appeared.  In passing,
      release-note the FDW API postcondition change from the same commit.
      10718612
  3. 18 Aug, 2014 7 commits
  4. 17 Aug, 2014 2 commits
    • Tom Lane's avatar
      Improve DISCARD documentation. · 259904ec
      Tom Lane authored
      The new DISCARD SEQUENCES option was inadequately described, and hadn't
      been mentioned at all in the initial Description paragraph.  Rather than
      rectifying the latter the hard way, it seemed better to rewrite the
      description as a summary, instead of having it basically duplicate
      statements made under Parameters.  Be more consistent about the ordering
      of the options, too.
      259904ec
    • Peter Eisentraut's avatar
      doc: Work around stylesheet bug for man build · 1330e292
      Peter Eisentraut authored
      The upstream stylesheets for man output insert a *roff comment for an
      occurrence of an indexterm, for reasons that have apparently been lost
      in history.  This, however, is done incorrectly and causes some
      formatting problems.  This hasn't been an issue until now, but the
      reorganization of indexterm elements inside variablelists has triggered
      this issue.
      
      The upstream fix (http://sourceforge.net/p/docbook/bugs/1340/) is to
      drop indexterms altogether in man output, and so we'll do the same here.
      1330e292
  5. 16 Aug, 2014 3 commits
    • Tom Lane's avatar
      Fix bogus return macros in range_overright_internal(). · 737cdc2d
      Tom Lane authored
      PG_RETURN_BOOL() should only be used in functions following the V1 SQL
      function API.  This coding accidentally fails to fail since letting the
      compiler coerce the Datum representation of bool back to plain bool
      does give the right answer; but that doesn't make it a good idea.
      
      Back-patch to older branches just to avoid unnecessary code divergence.
      737cdc2d
    • Tom Lane's avatar
      Add opr_sanity queries to inspect commutator/negator links more closely. · a068b5b6
      Tom Lane authored
      Make lists of the names of all operators that are claimed to be commutator
      pairs or negator pairs.  This is analogous to the existing queries that
      make lists of all operator names appearing in particular opclass strategy
      slots.  Unexpected additions to these lists are likely to be mistakes; had
      we had these queries in place before, bug #11178 might've been prevented.
      a068b5b6
    • Tom Lane's avatar
      Fix bogus commutator/negator links for JSONB containment operators. · e3f9c168
      Tom Lane authored
      <@ and @> are each other's commutators, but they were incorrectly marked
      as being each other's negators instead.  (This was actually questioned
      in a comment in the original commit, but nobody followed through :-(.)
      Per bug #11178 from Christian Pronovost.
      
      In passing, fix some JSONB operator descriptions that were randomly
      different from the phrasing of every other similar description.
      
      catversion bump for pg_catalog contents change.
      e3f9c168
  6. 15 Aug, 2014 7 commits
  7. 14 Aug, 2014 7 commits
  8. 13 Aug, 2014 3 commits
    • Tom Lane's avatar
      Prevent memory leaks in parseRelOptions(). · a844c299
      Tom Lane authored
      parseRelOptions() tended to leak memory in the caller's context.  Most
      of the time this doesn't really matter since the caller's context is
      at most query-lifespan, and the function won't be invoked very many times.
      However, when testing with CLOBBER_CACHE_RECURSIVELY, the same relcache
      entry can get rebuilt a *lot* of times in one query, leading to significant
      intraquery memory bloat if it has any reloptions.  Noted while
      investigating a related report from Tomas Vondra.
      
      In passing, get rid of some Asserts that are redundant with the one
      done by deconstruct_array().
      
      As with other patches to avoid leaks in CLOBBER_CACHE testing, it doesn't
      really seem worth back-patching this.
      a844c299
    • Tom Lane's avatar
      Prevent memory leaks in RelationGetIndexList, RelationGetIndexAttrBitmap. · ab8c84db
      Tom Lane authored
      When replacing rd_indexlist, rd_indexattr, etc, we neglected to pfree any
      old value of these fields.  Under ordinary circumstances, the old value
      would always be NULL, so this seemed reasonable enough.  However, in cases
      where we're rebuilding a system catalog's relcache entry and another cache
      flush occurs on that same catalog meanwhile, it's possible for the field to
      not be NULL when we return to the outer level, because we already refilled
      it while recovering from the inner flush.  This leads to a fairly small
      session-lifespan leak in CacheMemoryContext.  In real-world usage the leak
      would be too small to notice; but in testing with CLOBBER_CACHE_RECURSIVELY
      the leakage can add up to the point of causing OOM failures, as reported by
      Tomas Vondra.
      
      The issue has been there a long time, but it only seems worth fixing in
      HEAD, like the previous fix in this area (commit 078b2ed2).
      ab8c84db
    • Fujii Masao's avatar
      Expose -S option in pg_receivexlog. · 52bffe34
      Fujii Masao authored
      This option is equivalent to --slot option which pg_receivexlog has
      already supported, which specifies the replication slot to use for
      WAL streaming. pg_recvlogical has already supported both options,
      and this commit makes pg_receivexlog consistent with pg_recvlogical
      regarding the slot option.
      
      Back-patch to 9.4 where the slot option was added.
      
      Michael Paquier
      52bffe34
  9. 12 Aug, 2014 3 commits
    • Andres Freund's avatar
      pg_recvlogical message and code improvements. · 596385be
      Andres Freund authored
      Some error messages complained about --init and --stop being used
      whereas the --create and --drop are the correct verbs. Fix that.
      
      Also a XLogRecPtr was tested in a boolean fashion instead of being
      compared to InvalidXLogRecPtr.
      
      Backpatch to 9.4 where pg_recvlogical was introduced.
      
      Michael Paquier
      596385be
    • Fujii Masao's avatar
      Fix typo in \setrandom document. · d6ded369
      Fujii Masao authored
      Fabien COELHO
      d6ded369
    • Andres Freund's avatar
      Be less aggressive in asking for feedback of logical walsender clients. · 41d5f8ad
      Andres Freund authored
      When doing logical decoding using START_LOGICAL_REPLICATION in a
      walsender process the walsender sometimes was sending out keepalive
      messages too frequently. Asking for feedback every time.
      
      WalSndWaitForWal() sends out keepalive messages when it's waiting for
      new WAL to be generated locally when it sees that the remote side
      hasn't yet flushed WAL up to the local position. That generally is
      good but causes problems if the remote side only writes but doesn't
      flush changes yet. So check for both remote write and flush position.
      
      Additionally we've asked for feedback to the keepalive message which
      isn't warranted when waiting for WAL in contrast to preventing
      timeouts because of wal_sender_timeout.
      
      Complaint and patch by Steve Singer.
      41d5f8ad