1. 02 Nov, 2017 10 commits
  2. 01 Nov, 2017 6 commits
  3. 31 Oct, 2017 5 commits
  4. 30 Oct, 2017 4 commits
    • Tom Lane's avatar
      Doc: call out UPDATE syntax change as a v10 compatibility issue. · 86182b18
      Tom Lane authored
      The change made by commit 906bfcad means that if you're writing
      a parenthesized column list in UPDATE ... SET, but that column list
      is only one column, you now need to write ROW(expression) on the
      righthand side, not just a parenthesized expression.  This was an
      intentional change for spec compatibility and potential future
      expansion of the possibilities for the RHS, but I'd neglected to
      document it as a compatibility issue, figuring that hardly anyone
      would bother with parenthesized syntax for a single target column.
      I was wrong, as shown by questions from Justin Pryzby, Adam Brusselback,
      and others.  Move the release note item into the compatibility section
      and point out the behavior change for a single target column.
      
      Discussion: https://postgr.es/m/CAMjNa7cDLzPcs0xnRpkvqmJ6Vb6G3EH8CYGp9ZBjXdpFfTz6dg@mail.gmail.com
      86182b18
    • Alvaro Herrera's avatar
      Fix autovacuum work item error handling · be72b9c3
      Alvaro Herrera authored
      In autovacuum's "work item" processing, a few strings were allocated in
      the current transaction's memory context, which goes away during error
      handling; if an error happened during execution of the work item, the
      pfree() calls to clean up afterwards would try to release already-released
      memory, possibly leading to a crash.  In branch master, this was already
      fixed by commit 335f3d04, so backpatch that to REL_10_STABLE to fix
      the problem there too.
      
      As a secondary problem, verify that the autovacuum worker is connected
      to the right database for each work item; otherwise some items would be
      discarded by workers in other databases.
      
      Reported-by: Justin Pryzby
      Discussion: https://postgr.es/m/20171014035732.GB31726@telsasoft.com
      be72b9c3
    • Magnus Hagander's avatar
      Fix typo · 77954f99
      Magnus Hagander authored
      77954f99
    • Magnus Hagander's avatar
      Fix typo in comment · 854b643c
      Magnus Hagander authored
      Etsuro Fujita
      854b643c
  5. 29 Oct, 2017 3 commits
  6. 28 Oct, 2017 6 commits
  7. 27 Oct, 2017 6 commits
    • Tom Lane's avatar
      Dept of second thoughts: keep aliasp_item in sync with tlistitem. · d76886c2
      Tom Lane authored
      Commit d5b760ec wasn't quite right, on second thought: if the
      caller didn't ask for column names then it would happily emit
      more Vars than if the caller did ask for column names.  This
      is surely not a good idea.  Advance the aliasp_item whether or
      not we're preparing a colnames list.
      d76886c2
    • Tom Lane's avatar
      Fix crash when columns have been added to the end of a view. · d5b760ec
      Tom Lane authored
      expandRTE() supposed that an RTE_SUBQUERY subquery must have exactly
      as many non-junk tlist items as the RTE has column aliases for it.
      This was true at the time the code was written, and is still true so
      far as parse analysis is concerned --- but when the function is used
      during planning, the subquery might have appeared through insertion
      of a view that now has more columns than it did when the outer query
      was parsed.  This results in a core dump if, for instance, we have
      to expand a whole-row Var that references the subquery.
      
      To avoid crashing, we can either stop expanding the RTE when we run
      out of aliases, or invent new aliases for the added columns.  While
      the latter might be more useful, the former is consistent with what
      expandRTE() does for composite-returning functions in the RTE_FUNCTION
      case, so it seems like we'd better do it that way.
      
      Per bug #14876 from Samuel Horwitz.  This has been busted since commit
      ff1ea217 allowed views to acquire more columns, so back-patch to all
      supported branches.
      
      Discussion: https://postgr.es/m/20171026184035.1471.82810@wrigleys.postgresql.org
      d5b760ec
    • Robert Haas's avatar
      Allow parallel query for prepared statements with generic plans. · 682ce911
      Robert Haas authored
      This was always intended to work, but due to an oversight in
      max_parallel_hazard_walker, it didn't.  In testing, we missed the
      fact that it was only working for custom plans, where the parameter
      value has been substituted for the parameter itself early enough
      that everything worked.  In a generic plan, the Param node survives
      and must be treated as parallel-safe.  SerializeParamList provides
      for the transmission of parameter values to workers.
      
      Amit Kapila with help from Kuntal Ghosh.  Some changes by me.
      
      Discussion: http://postgr.es/m/CAA4eK1+_BuZrmVCeua5Eqnm4Co9DAXdM5HPAOE2J19ePbR912Q@mail.gmail.com
      682ce911
    • Tom Lane's avatar
      Rethink the dependencies recorded for FieldSelect/FieldStore nodes. · 6784d7a1
      Tom Lane authored
      On closer investigation, commits f3ea3e3e et al were a few bricks
      shy of a load.  What we need is not so much to lock down the result
      type of a FieldSelect, as to lock down the existence of the column
      it's trying to extract.  Otherwise, we can break it by dropping that
      column.  The dependency on the result type is then held indirectly
      through the column, and doesn't need to be recorded explicitly.
      
      Out of paranoia, I left in the code to record a dependency on the
      result type, but it's used only if we can't identify the pg_class OID
      for the column.  That shouldn't ever happen right now, AFAICS, but
      it seems possible that in future the input node could be marked as
      being of type RECORD rather than some specific composite type.
      
      Likewise for FieldStore.
      
      Like the previous patch, back-patch to all supported branches.
      
      Discussion: https://postgr.es/m/22571.1509064146@sss.pgh.pa.us
      6784d7a1
    • Robert Haas's avatar
      Revert "Move new structure member to the end." · f0392e67
      Robert Haas authored
      This reverts commit 94d622f2.  That
      commit was supposed to get pushed to REL_10_STABLE, but I messed
      up.
      f0392e67
    • Tom Lane's avatar
      Doc: mention that you can't PREPARE TRANSACTION after NOTIFY. · e4fbf228
      Tom Lane authored
      The NOTIFY page said this already, but the PREPARE TRANSACTION page
      missed it.
      
      Discussion: https://postgr.es/m/20171024010602.1488.80066@wrigleys.postgresql.org
      e4fbf228