1. 04 Apr, 2019 7 commits
  2. 03 Apr, 2019 11 commits
    • Tom Lane's avatar
    • Tomas Vondra's avatar
      Add SETTINGS option to EXPLAIN, to print modified settings. · ea569d64
      Tomas Vondra authored
      Query planning is affected by a number of configuration options, and it
      may be crucial to know which of those options were set to non-default
      values.  With this patch you can say EXPLAIN (SETTINGS ON) to include
      that information in the query plan.  Only options affecting planning,
      with values different from the built-in default are printed.
      
      This patch also adds auto_explain.log_settings option, providing the
      same capability in auto_explain module.
      
      Author: Tomas Vondra
      Reviewed-by: Rafia Sabih, John Naylor
      Discussion: https://postgr.es/m/e1791b4c-df9c-be02-edc5-7c8874944be0@2ndquadrant.com
      ea569d64
    • Alvaro Herrera's avatar
      Tweak docs for log_statement_sample_rate · d1f04b96
      Alvaro Herrera authored
      Author: Justin Pryzby, partly after a suggestion from Masahiko Sawada
      Discussion: https://postgr.es/m/20190328135918.GA27808@telsasoft.com
      Discussion: https://postgr.es/m/CAD21AoB9+y8N4+Fan-ne-_7J5yTybPttxeVKfwUocKp4zT1vNQ@mail.gmail.com
      d1f04b96
    • Alvaro Herrera's avatar
      Log all statements from a sample of transactions · 799e2203
      Alvaro Herrera authored
      This is useful to obtain a view of the different transaction types in an
      application, regardless of the durations of the statements each runs.
      
      Author: Adrien Nayrat
      Reviewed-by: Masahiko Sawada, Hayato Kuroda, Andres Freund
      799e2203
    • Tom Lane's avatar
      Remove now-unnecessary thread pointer arguments in pgbench. · d8c0bd9f
      Tom Lane authored
      Not required after nuking the zipfian thread-local cache.
      
      Also add a comment about hazardous pointer punning in threadRun(),
      and avoid using "thread" to refer to the threads array as a whole.
      
      Fabien Coelho and Tom Lane, per suggestion from Alvaro Herrera
      
      Discussion: https://postgr.es/m/alpine.DEB.2.21.1904032126060.7997@lancre
      d8c0bd9f
    • Tomas Vondra's avatar
      Reduce overhead of pg_mcv_list (de)serialization · c50b3158
      Tomas Vondra authored
      Commit ea4e1c0e resolved issues with memory alignment in serialized
      pg_mcv_list values, but it required copying data to/from the varlena
      buffer during serialization and deserialization.  As the MCV lits may
      be fairly large, the overhead (memory consumption, CPU usage) can get
      rather significant too.
      
      This change tweaks the serialization format so that the alignment is
      correct with respect to the varlena value, and so the parts may be
      accessed directly without copying the data.
      
      Catversion bump, as it affects existing pg_statistic_ext data.
      c50b3158
    • Stephen Frost's avatar
      GSSAPI encryption support · b0b39f72
      Stephen Frost authored
      On both the frontend and backend, prepare for GSSAPI encryption
      support by moving common code for error handling into a separate file.
      Fix a TODO for handling multiple status messages in the process.
      Eliminate the OIDs, which have not been needed for some time.
      
      Add frontend and backend encryption support functions.  Keep the
      context initiation for authentication-only separate on both the
      frontend and backend in order to avoid concerns about changing the
      requested flags to include encryption support.
      
      In postmaster, pull GSSAPI authorization checking into a shared
      function.  Also share the initiator name between the encryption and
      non-encryption codepaths.
      
      For HBA, add "hostgssenc" and "hostnogssenc" entries that behave
      similarly to their SSL counterparts.  "hostgssenc" requires either
      "gss", "trust", or "reject" for its authentication.
      
      Similarly, add a "gssencmode" parameter to libpq.  Supported values are
      "disable", "require", and "prefer".  Notably, negotiation will only be
      attempted if credentials can be acquired.  Move credential acquisition
      into its own function to support this behavior.
      
      Add a simple pg_stat_gssapi view similar to pg_stat_ssl, for monitoring
      if GSSAPI authentication was used, what principal was used, and if
      encryption is being used on the connection.
      
      Finally, add documentation for everything new, and update existing
      documentation on connection security.
      
      Thanks to Michael Paquier for the Windows fixes.
      
      Author: Robbie Harwood, with changes to the read/write functions by me.
      Reviewed in various forms and at different times by: Michael Paquier,
         Andres Freund, David Steele.
      Discussion: https://www.postgresql.org/message-id/flat/jlg1tgq1ktm.fsf@thriss.redhat.com
      b0b39f72
    • Alvaro Herrera's avatar
      Copy name when cloning FKs recurses to partitions · 5f6fc34a
      Alvaro Herrera authored
      We were passing a string owned by a syscache entry, which was released
      before recursing.  Fix by pstrdup'ing the string.
      
      Per buildfarm member prion.
      5f6fc34a
    • Alvaro Herrera's avatar
      Support foreign keys that reference partitioned tables · f56f8f8d
      Alvaro Herrera authored
      Previously, while primary keys could be made on partitioned tables, it
      was not possible to define foreign keys that reference those primary
      keys.  Now it is possible to do that.
      
      Author: Álvaro Herrera
      Reviewed-by: Amit Langote, Jesper Pedersen
      Discussion: https://postgr.es/m/20181102234158.735b3fevta63msbj@alvherre.pgsql
      f56f8f8d
    • Heikki Linnakangas's avatar
      Generate less WAL during GiST, GIN and SP-GiST index build. · 9155580f
      Heikki Linnakangas authored
      Instead of WAL-logging every modification during the build separately,
      first build the index without any WAL-logging, and make a separate pass
      through the index at the end, to write all pages to the WAL. This
      significantly reduces the amount of WAL generated, and is usually also
      faster, despite the extra I/O needed for the extra scan through the index.
      WAL generated this way is also faster to replay.
      
      For GiST, the LSN-NSN interlock makes this a little tricky. All pages must
      be marked with a valid (i.e. non-zero) LSN, so that the parent-child
      LSN-NSN interlock works correctly. We now use magic value 1 for that during
      index build. Change the fake LSN counter to begin from 1000, so that 1 is
      safely smaller than any real or fake LSN. 2 would've been enough for our
      purposes, but let's reserve a bigger range, in case we need more special
      values in the future.
      
      Author: Anastasia Lubennikova, Andrey V. Lepikhov
      Reviewed-by: Heikki Linnakangas, Dmitry Dolgov
      9155580f
    • Alvaro Herrera's avatar
      Correctly initialize newly added struct member · 5f768045
      Alvaro Herrera authored
      Valgrind was rightly complaining that IndexVacuumInfo->report_progress
      (added by commit ab0dfc96) was not being initialized in some code
      paths.  Repair.
      
      Per buildfarm member lousyjack.
      5f768045
  3. 02 Apr, 2019 11 commits
  4. 01 Apr, 2019 11 commits