1. 18 May, 2017 3 commits
  2. 17 May, 2017 12 commits
  3. 16 May, 2017 8 commits
  4. 15 May, 2017 17 commits
    • Tom Lane's avatar
      Stamp 10beta1. · 5ad367a3
      Tom Lane authored
      5ad367a3
    • Tom Lane's avatar
      git-ignore intermediate files from new docs toolchain. · 1aedcf98
      Tom Lane authored
      Building PDFs with the new toolchain creates *.fo temporary files.
      1aedcf98
    • Robert Haas's avatar
    • Tom Lane's avatar
      Update oidjoins regression test for v10. · e3f67a5a
      Tom Lane authored
      e3f67a5a
    • Peter Eisentraut's avatar
      Add assertion to quiet Coverity · b1ff33fd
      Peter Eisentraut authored
      b1ff33fd
    • Peter Eisentraut's avatar
      Translation updates · 82d24bab
      Peter Eisentraut authored
      Source-Git-URL: git://git.postgresql.org/git/pgtranslation/messages.git
      Source-Git-Hash: 398beeef4921df0956f917becd7b5669d2a8a5c4
      82d24bab
    • Peter Eisentraut's avatar
      doc: Remove unused file · 4b99d32b
      Peter Eisentraut authored
      sql.sgml has not been part of the documentation since forever, so it's
      pointless to keep it around.
      4b99d32b
    • Tom Lane's avatar
      Fix bogus syntax for CREATE PUBLICATION commands emitted by pg_dump. · 4041808b
      Tom Lane authored
      Original coding was careless about where to insert commas.
      
      Masahiko Sawada
      
      Discussion: https://postgr.es/m/3427593a-61aa-b17e-64ef-383b7742d6d9@enterprisedb.com
      4041808b
    • Tom Lane's avatar
      Fix unsafe reference into relcache in constructed CommentStmt. · 12590c5d
      Tom Lane authored
      The CommentStmt made by RebuildConstraintComment() has to pstrdup the
      relation name, else it will contain a dangling pointer after that
      relcache entry is flushed.  (I'm less sure that pstrdup'ing conname
      is necessary, but let's be safe.)  Failure to do this leads to weird
      errors or crashes, as reported by Marko Elezovic.
      
      Bug introduced by commit e42375fc, so back-patch to 9.5 as that was.
      
      Fix by David Rowley, regression test by Michael Paquier
      
      Discussion: https://postgr.es/m/DB6PR03MB30775D58E732D4EB0C13725B9AE00@DB6PR03MB3077.eurprd03.prod.outlook.com
      12590c5d
    • Peter Eisentraut's avatar
      Fix ALTER SEQUENCE locking · f8dc1985
      Peter Eisentraut authored
      In 1753b1b0, the pg_sequence system
      catalog was introduced.  This made sequence metadata changes
      transactional, while the actual sequence values are still behaving
      nontransactionally.  This requires some refinement in how ALTER
      SEQUENCE, which operates on both, locks the sequence and the catalog.
      
      The main problems were:
      
      - Concurrent ALTER SEQUENCE causes "tuple concurrently updated" error,
        caused by updates to pg_sequence catalog.
      
      - Sequence WAL writes and catalog updates are not protected by same
        lock, which could lead to inconsistent recovery order.
      
      - nextval() disregarding uncommitted ALTER SEQUENCE changes.
      
      To fix, nextval() and friends now lock the sequence using
      RowExclusiveLock instead of AccessShareLock.  ALTER SEQUENCE locks the
      sequence using ShareRowExclusiveLock.  This means that nextval() and
      ALTER SEQUENCE block each other, and ALTER SEQUENCE on the same sequence
      blocks itself.  (This was already the case previously for the OWNER TO,
      RENAME, and SET SCHEMA variants.)  Also, rearrange some code so that the
      entire AlterSequence is protected by the lock on the sequence.
      
      As an exception, use reduced locking for ALTER SEQUENCE ... RESTART.
      Since that is basically a setval(), it does not require the full locking
      of other ALTER SEQUENCE actions.  So check whether we are only running a
      RESTART and run with less locking if so.
      Reviewed-by: default avatarMichael Paquier <michael.paquier@gmail.com>
      Reported-by: default avatarJason Petersen <jason@citusdata.com>
      Reported-by: default avatarAndres Freund <andres@anarazel.de>
      f8dc1985
    • Magnus Hagander's avatar
      Fix typo in comment · b1c45afb
      Magnus Hagander authored
      Michael Paquier
      b1c45afb
    • Tom Lane's avatar
      stats regression test's wait_for_stats() must check timestamp too. · eda4ef81
      Tom Lane authored
      pg_stat_get_snapshot_timestamp() returns the timestamp seen in the "global"
      stats file.  Because pgstat_write_statsfiles() writes per-DB stats files
      before the global file (or at least before renaming it into place), there
      is a window where the test backend can see all the stats updates that
      wait_for_stats() was checking for (all of which come from the per-DB file)
      but also see the same global stats file it had seen at the start of the
      test script.  This results in a failure in only the "snapshot_newer" query,
      as reported by a couple of buildfarm members recently.
      
      I suspect that this ought to be back-patched.  Commit 4e37b3e1 has
      evidently increased the probability of this window getting hit, but
      it's not apparent why it could not have been hit before.  I'll refrain
      for the moment though.
      eda4ef81
    • Bruce Momjian's avatar
    • Tom Lane's avatar
      Make pgstat tabstat lookup hash table less fragile. · 5d00b764
      Tom Lane authored
      Code review for commit 090010f2.
      
      Fix cases where an elog(ERROR) partway through a function would leave the
      persistent data structures in a corrupt state.  pgstat_report_stat got this
      wrong by invalidating PgStat_TableEntry structs before removing hashtable
      entries pointing to them, and get_tabstat_entry got it wrong by ignoring
      the possibility of palloc failure after it had already created a hashtable
      entry.
      
      Also, avoid leaking a memory context per transaction, which the previous
      code did through misunderstanding hash_create's API.  We do not need to
      create a context to hold the hash table; hash_create will do that.
      (The leak wasn't that large, amounting to only a memory context header
      per iteration, but it's still surprising that nobody noticed it yet.)
      5d00b764
    • Bruce Momjian's avatar
      b91e5b46
    • Tom Lane's avatar
      Make stats regression test more robust in the face of parallel query. · 7606bbb3
      Tom Lane authored
      Commit 60690a6f attempted to fix the wait_for_stats() function in this
      test so that it would wait properly if the tenk2 scans were done in
      parallel workers instead of the main session (typically as a consequence of
      force_parallel_mode being turned on).  However, we made it test for whether
      the main session's actions had been reported by looking for inserts on
      'trunc_stats_test'.  This is the Wrong Thing, because those aren't the last
      updates we expect the main session to do.  As shown by recent failures on
      buildfarm member frogmouth, it's entirely likely that the trunc_stats_test
      updates will be reported in a separate message from later updates, which
      means there can be a window in which wait_for_stats() will exit but not all
      the updates we are expecting to see will have arrived.  We should test for
      the last updates we're expecting, namely those on 'trunc_stats_test4'.
      
      Unfortunately, I doubt that this explains frogmouth's failures, because
      there's no reason to believe that it's running the tenk2 queries in
      parallel.  Still, the test is wrong on its own terms, so fix and back-patch
      to 9.6 where parallel query came in.
      7606bbb3
    • Robert Haas's avatar
      Attempt to fix compiler warning. · edbe2a29
      Robert Haas authored
      Per a report from Tom Lane, newer versions of gcc apparently think
      that partexprs_item_saved can be used uninitialized.  Try to convince
      them otherwise.
      edbe2a29