1. 09 Jun, 2016 5 commits
    • Robert Haas's avatar
      Yet again update typedefs.list file in preparation for pgindent run · e7bcd983
      Robert Haas authored
      Because the run was delayed, the file had a chance to get out of date.
      e7bcd983
    • Tom Lane's avatar
      Clarify documentation of ceil/ceiling/floor functions. · 7feb60c1
      Tom Lane authored
      Document these as "nearest integer >= argument" and "nearest integer <=
      argument", which will hopefully be less confusing than the old formulation.
      New wording is from Matlab via Dean Rasheed.
      
      I changed the pg_description entries as well as the SGML docs.  In the
      back branches, this will only affect installations initdb'd in the future,
      but it should be harmless otherwise.
      
      Discussion: <CAEZATCW3yzJo-NMSiQs5jXNFbTsCEftZS-Og8=FvFdiU+kYuSA@mail.gmail.com>
      7feb60c1
    • Tom Lane's avatar
      Mop-up for parallel degree-ectomy. · e4158319
      Tom Lane authored
      Fix a couple of overlooked uses of "degree" terminology.  Make the parallel
      worker count selection logic in create_plain_partial_paths more robust (in
      particular, it failed with max_parallel_workers_per_gather set to zero).
      e4158319
    • Robert Haas's avatar
      Eliminate "parallel degree" terminology. · c9ce4a1c
      Robert Haas authored
      This terminology provoked widespread complaints.  So, instead, rename
      the GUC max_parallel_degree to max_parallel_workers_per_gather
      (leaving room for a possible future GUC max_parallel_workers that acts
      as a system-wide limit), and rename the parallel_degree reloption to
      parallel_workers.  Rename structure members to match.
      
      These changes create a dump/restore hazard for users of PostgreSQL
      9.6beta1 who have set the reloption (or applied the GUC using ALTER
      USER or ALTER DATABASE).
      c9ce4a1c
    • Tom Lane's avatar
      Polish the documentation concerning phrase text search. · 6581e930
      Tom Lane authored
      Fix grammar, improve examples, etc.
      
      I did not attempt to document the current behavior concerning distance-zero
      matches, because I think that's broken and needs to change, so I'm not
      going to use up brain cells figuring out how to explain how it works now.
      One way or the other, there's still more to write here.
      6581e930
  2. 08 Jun, 2016 2 commits
  3. 07 Jun, 2016 24 commits
  4. 06 Jun, 2016 6 commits
    • Tom Lane's avatar
      Don't reset changes_since_analyze after a selective-columns ANALYZE. · f64340e7
      Tom Lane authored
      If we ANALYZE only selected columns of a table, we should not postpone
      auto-analyze because of that; other columns may well still need stats
      updates.  As committed, the counter is left alone if a column list is
      given, whether or not it includes all analyzable columns of the table.
      Per complaint from Tomasz Ostrowski.
      
      It's been like this a long time, so back-patch to all supported branches.
      
      Report: <ef99c1bd-ff60-5f32-2733-c7b504eb960c@ato.waw.pl>
      f64340e7
    • Robert Haas's avatar
      Stop the executor if no more tuples can be sent from worker to leader. · c6dbf1fe
      Robert Haas authored
      If a Gather node has read as many tuples as it needs (for example, due
      to Limit) it may detach the queue connecting it to the worker before
      reading all of the worker's tuples.  Rather than let the worker
      continue to generate and send all of the results, have it stop after
      sending the next tuple.
      
      More could be done here to stop the worker even quicker, but this is
      about as well as we can hope to do for 9.6.
      
      This is in response to a problem report from Andreas Seltenreich.
      Commit 44339b89 should be actually be
      sufficient to fix that example even without this change, but it seems
      better to do this, too, since we might otherwise waste quite a large
      amount of effort in one or more workers.
      
      Discussion: CAA4eK1KOKGqmz9bGu+Z42qhRwMbm4R5rfnqsLCNqFs9j14jzEA@mail.gmail.com
      
      Amit Kapila
      c6dbf1fe
    • Robert Haas's avatar
      shm_mq: After a send fails with SHM_MQ_DETACHED, later ones should too. · 44339b89
      Robert Haas authored
      Prior to this patch, it was occasionally possible, after shm_mq_sendv
      had previously returned SHM_MQ_DETACHED, for a later shm_mq_sendv
      operation to fail an assertion instead of just again returning
      SHM_MQ_ATTACHED.  From the shm_mq code's point of view, it was
      expecting to be called again with the same arguments, since the
      previous operation had only partially completed.  However, a caller
      who isn't using non-blocking mode won't be prepared to repeat the call
      with the same arguments, and this code shouldn't expect that they
      will.  Repair in such a way that we'll be OK whether the next call
      uses the same arguments or not.
      
      Found by Andreas Seltenreich.  Analysis and sketch of fix by Amit
      Kapila.  Patch by me, reviewed by Amit Kapila.
      44339b89
    • Robert Haas's avatar
      pg_upgrade: Don't overwrite existing files. · e191a690
      Robert Haas authored
      For historical reasons, copyFile and rewriteVisibilityMap took a force
      argument which was always passed as true, meaning that any existing
      file should be overwritten.  However, it seems much safer to instead
      fail if a file we need to write already exists.
      
      While we're at it, remove the "force" argument altogether, since it was
      never passed as anything other than true (and now we would never pass
      it as anything other than false, if we kept it).
      
      Noted by Andres Freund during post-commit review of the patch that added
      rewriteVisibilityMap, commit 7087166a,
      but this also changes the behavior when copying files without rewriting
      them.
      
      Patch by Masahiko Sawada.
      e191a690
    • Robert Haas's avatar
      Fix typo. · 932b97a0
      Robert Haas authored
      Jim Nasby
      932b97a0
    • Robert Haas's avatar
      pg_upgrade: Improve error checking in rewriteVisibilityMap. · aba89430
      Robert Haas authored
      In the old logic, if read() were to return an error, we'd silently stop
      rewriting the visibility map at that point in the file.  That's safe,
      but reporting the error is better, so do that instead.
      
      Report by Andres Freund.  Patch by Masahiko Sawada, with one correction
      by me.
      aba89430
  5. 05 Jun, 2016 2 commits
    • Peter Eisentraut's avatar
      Fix whitespace · 6201a8ef
      Peter Eisentraut authored
      6201a8ef
    • Tom Lane's avatar
      Properly initialize SortSupport for ORDER BY rechecks in nodeIndexscan.c. · 8a859691
      Tom Lane authored
      Fix still another bug in commit 35fcb1b3: it failed to fully initialize
      the SortSupport states it introduced to allow the executor to re-check
      ORDER BY expressions containing distance operators.  That led to a null
      pointer dereference if the sortsupport code tried to use ssup_cxt.  The
      problem only manifests in narrow cases, explaining the lack of previous
      field reports.  It requires a GiST-indexable distance operator that lacks
      SortSupport and is on a pass-by-ref data type, which among core+contrib
      seems to be only btree_gist's interval opclass; and it requires the scan
      to be done as an IndexScan not an IndexOnlyScan, which explains how
      btree_gist's regression test didn't catch it.  Per bug #14134 from
      Jihyun Yu.
      
      Peter Geoghegan
      
      Report: <20160511154904.2603.43889@wrigleys.postgresql.org>
      8a859691
  6. 04 Jun, 2016 1 commit