1. 13 Nov, 2019 6 commits
    • Tom Lane's avatar
      Avoid downcasing/truncation of RADIUS authentication parameters. · 7618eaf5
      Tom Lane authored
      Commit 6b76f1bb changed all the RADIUS auth parameters to be lists
      rather than single values.  But its use of SplitIdentifierString
      to parse the list format was not very carefully thought through,
      because that function thinks it's parsing SQL identifiers, which
      means it will (a) downcase the strings and (b) truncate them to
      be shorter than NAMEDATALEN.  While downcasing should be harmless
      for the server names and ports, it's just wrong for the shared
      secrets, and probably for the NAS Identifier strings as well.
      The truncation aspect is at least potentially a problem too,
      though typical values for these parameters would fit in 63 bytes.
      
      Fortunately, we now have a function SplitGUCList that is exactly
      the same except for not doing the two unwanted things, so fixing
      this is a trivial matter of calling that function instead.
      
      While here, improve the documentation to show how to double-quote
      the parameter values.  I failed to resist the temptation to do
      some copy-editing as well.
      
      Report and patch from Marcos David (bug #16106); doc changes by me.
      Back-patch to v10 where the aforesaid commit came in, since this is
      arguably a regression from our previous behavior with RADIUS auth.
      
      Discussion: https://postgr.es/m/16106-7d319e4295d08e70@postgresql.org
      7618eaf5
    • Tom Lane's avatar
      Include TableFunc references when computing expression dependencies. · 2c7b5dad
      Tom Lane authored
      The TableFunc node (i.e., XMLTABLE) includes type and collation OIDs
      that might not be referenced anywhere else in the expression tree,
      so they need to be accounted for when extracting dependencies.
      
      Fortunately, the practical effects of this are limited, since
      (a) it's somewhat unlikely that people would be extracting
      columns of non-builtin types from an XML document, and (b)
      in many scenarios, the query would contain other references
      to such types, or functions depending on them.  However, it's
      not hard to construct examples wherein the existing code lets
      one drop a type used in XMLTABLE and thereby break a view.
      
      This is evidently an original oversight in the XMLTABLE patch,
      so back-patch to v10 where that came in.
      
      Discussion: https://postgr.es/m/18427.1573508501@sss.pgh.pa.us
      2c7b5dad
    • Tom Lane's avatar
      Handle arrays and ranges in pg_upgrade's test for non-upgradable types. · 29aeda6e
      Tom Lane authored
      pg_upgrade needs to check whether certain non-upgradable data types
      appear anywhere on-disk in the source cluster.  It knew that it has
      to check for these types being contained inside domains and composite
      types; but it somehow overlooked that they could be contained in
      arrays and ranges, too.  Extend the existing recursive-containment
      query to handle those cases.
      
      We probably should have noticed this oversight while working on
      commit 0ccfc282 and follow-ups, but we failed to :-(.  The whole
      thing's possibly a bit overdesigned, since we don't really expect
      that any of these types will appear on disk; but if we're going to
      the effort of doing a recursive search then it's silly not to cover
      all the possibilities.
      
      While at it, refactor so that we have only one copy of the search
      logic, not three-and-counting.  Also, to keep the branches looking
      more alike, back-patch the output wording change of commit 1634d361.
      
      Back-patch to all supported branches.
      
      Discussion: https://postgr.es/m/31473.1573412838@sss.pgh.pa.us
      29aeda6e
    • Fujii Masao's avatar
      Make pg_waldump report more detail information about PREPARE TRANSACTION record. · 7b8a899b
      Fujii Masao authored
      This commit changes xact_desc() so that it reports the detail information about
      PREPARE TRANSACTION record, like GID (global transaction identifier),
      timestamp at prepare transaction, delete-on-abort/commit relations,
      XID of subtransactions, and invalidation messages. These are helpful
      when diagnosing 2PC-related troubles.
      
      Author: Fujii Masao
      Reviewed-by: Michael Paquier, Andrey Lepikhov, Kyotaro Horiguchi, Julien Rouhaud, Alvaro Herrera
      Discussion: https://postgr.es/m/CAHGQGwEvhASad4JJnCv=0dW2TJypZgW_Vpb-oZik2a3utCqcrA@mail.gmail.com
      7b8a899b
    • Michael Paquier's avatar
      Add regression test for two-phase transaction in postgres_fdw · 94fec485
      Michael Paquier authored
      postgres_fdw does not support two-phase transactions, so let's add a
      small negative test case to check after it.  Note that this is checked
      using an end-of-xact callback to ensure a proper connection cleanup with
      the foreign server, which is called before checking if a server is able
      to handle 2PC with max_prepared_xacts, so this test does not need an
      alternate output file.
      
      Author: Gilles Darold
      Discussion: https://postgr.es/m/20191108090507.GC1768@paquier.xyz
      94fec485
    • Amit Kapila's avatar
      Introduce the 'force' option for the Drop Database command. · 1379fd53
      Amit Kapila authored
      This new option terminates the other sessions connected to the target
      database and then drop it.  To terminate other sessions, the current user
      must have desired permissions (same as pg_terminate_backend()).  We don't
      allow to terminate the sessions if prepared transactions, active logical
      replication slots or subscriptions are present in the target database.
      
      Author: Pavel Stehule with changes by me
      Reviewed-by: Dilip Kumar, Vignesh C, Ibrar Ahmed, Anthony Nowocien,
      Ryan Lambert and Amit Kapila
      Discussion: https://postgr.es/m/CAP_rwwmLJJbn70vLOZFpxGw3XD7nLB_7+NKz46H5EOO2k5H7OQ@mail.gmail.com
      1379fd53
  2. 12 Nov, 2019 9 commits
  3. 11 Nov, 2019 8 commits
  4. 09 Nov, 2019 6 commits
  5. 08 Nov, 2019 6 commits
  6. 07 Nov, 2019 5 commits