1. 01 Oct, 2021 1 commit
  2. 25 Sep, 2021 1 commit
  3. 16 Jul, 2021 1 commit
  4. 10 May, 2021 1 commit
  5. 06 May, 2021 1 commit
  6. 20 Apr, 2021 1 commit
  7. 19 Apr, 2021 1 commit
  8. 16 Apr, 2021 1 commit
  9. 09 Apr, 2021 1 commit
  10. 08 Apr, 2021 2 commits
  11. 07 Apr, 2021 1 commit
    • Bruce Momjian's avatar
      Make use of in-core query id added by commit 5fd9dfa5 · 4f0b0966
      Bruce Momjian authored
      Use the in-core query id computation for pg_stat_activity,
      log_line_prefix, and EXPLAIN VERBOSE.
      
      Similar to other fields in pg_stat_activity, only the queryid from the
      top level statements are exposed, and if the backends status isn't
      active then the queryid from the last executed statements is displayed.
      
      Add a %Q placeholder to include the queryid in log_line_prefix, which
      will also only expose top level statements.
      
      For EXPLAIN VERBOSE, if a query identifier has been computed, either by
      enabling compute_query_id or using a third-party module, display it.
      
      Bump catalog version.
      
      Discussion: https://postgr.es/m/20210407125726.tkvjdbw76hxnpwfi@nol
      
      Author: Julien Rouhaud
      
      Reviewed-by: Alvaro Herrera, Nitin Jadhav, Zhihong Yu
      4f0b0966
  12. 01 Apr, 2021 1 commit
  13. 31 Mar, 2021 1 commit
    • Etsuro Fujita's avatar
      Add support for asynchronous execution. · 27e1f145
      Etsuro Fujita authored
      This implements asynchronous execution, which runs multiple parts of a
      non-parallel-aware Append concurrently rather than serially to improve
      performance when possible.  Currently, the only node type that can be
      run concurrently is a ForeignScan that is an immediate child of such an
      Append.  In the case where such ForeignScans access data on different
      remote servers, this would run those ForeignScans concurrently, and
      overlap the remote operations to be performed simultaneously, so it'll
      improve the performance especially when the operations involve
      time-consuming ones such as remote join and remote aggregation.
      
      We may extend this to other node types such as joins or aggregates over
      ForeignScans in the future.
      
      This also adds the support for postgres_fdw, which is enabled by the
      table-level/server-level option "async_capable".  The default is false.
      
      Robert Haas, Kyotaro Horiguchi, Thomas Munro, and myself.  This commit
      is mostly based on the patch proposed by Robert Haas, but also uses
      stuff from the patch proposed by Kyotaro Horiguchi and from the patch
      proposed by Thomas Munro.  Reviewed by Kyotaro Horiguchi, Konstantin
      Knizhnik, Andrey Lepikhov, Movead Li, Thomas Munro, Justin Pryzby, and
      others.
      
      Discussion: https://postgr.es/m/CA%2BTgmoaXQEt4tZ03FtQhnzeDEMzBck%2BLrni0UWHVVgOTnA6C1w%40mail.gmail.com
      Discussion: https://postgr.es/m/CA%2BhUKGLBRyu0rHrDCMC4%3DRn3252gogyp1SjOgG8SEKKZv%3DFwfQ%40mail.gmail.com
      Discussion: https://postgr.es/m/20200228.170650.667613673625155850.horikyota.ntt%40gmail.com
      27e1f145
  14. 24 Mar, 2021 1 commit
  15. 23 Mar, 2021 1 commit
  16. 15 Mar, 2021 1 commit
    • Fujii Masao's avatar
      Make archiver process an auxiliary process. · d75288fb
      Fujii Masao authored
      This commit changes WAL archiver process so that it's treated as
      an auxiliary process and can use shared memory. This is an infrastructure
      patch required for upcoming shared-memory based stats collector patch
      series. These patch series basically need any processes including archiver
      that can report the statistics to access to shared memory. Since this patch
      itself is useful to simplify the code and when users monitor the status of
      archiver, it's committed separately in advance.
      
      This commit simplifies the code for WAL archiving. For example, previously
      backends need to signal to archiver via postmaster when they notify
      archiver that there are some WAL files to archive. On the other hand,
      this commit removes that signal to postmaster and enables backends to
      notify archier directly using shared latch.
      
      Also, as the side of this change, the information about archiver process
      becomes viewable at pg_stat_activity view.
      
      Author: Kyotaro Horiguchi
      Reviewed-by: Andres Freund, Álvaro Herrera, Julien Rouhaud, Tomas Vondra, Arthur Zakirov, Fujii Masao
      Discussion: https://postgr.es/m/20180629.173418.190173462.horiguchi.kyotaro@lab.ntt.co.jp
      d75288fb
  17. 12 Mar, 2021 1 commit
  18. 10 Mar, 2021 1 commit
  19. 09 Mar, 2021 3 commits
    • Fujii Masao's avatar
      Track total amounts of times spent writing and syncing WAL data to disk. · ff99918c
      Fujii Masao authored
      This commit adds new GUC track_wal_io_timing. When this is enabled,
      the total amounts of time XLogWrite writes and issue_xlog_fsync syncs
      WAL data to disk are counted in pg_stat_wal. This information would be
      useful to check how much WAL write and sync affect the performance.
      
      Enabling track_wal_io_timing will make the server query the operating
      system for the current time every time WAL is written or synced,
      which may cause significant overhead on some platforms. To avoid such
      additional overhead in the server with track_io_timing enabled,
      this commit introduces track_wal_io_timing as a separate parameter from
      track_io_timing.
      
      Note that WAL write and sync activity by walreceiver has not been tracked yet.
      
      This commit makes the server also track the numbers of times XLogWrite
      writes and issue_xlog_fsync syncs WAL data to disk, in pg_stat_wal,
      regardless of the setting of track_wal_io_timing. This counters can be
      used to calculate the WAL write and sync time per request, for example.
      
      Bump PGSTAT_FILE_FORMAT_ID.
      
      Bump catalog version.
      
      Author: Masahiro Ikeda
      Reviewed-By: Japin Li, Hayato Kuroda, Masahiko Sawada, David Johnston, Fujii Masao
      Discussion: https://postgr.es/m/0509ad67b585a5b86a83d445dfa75392@oss.nttdata.com
      ff99918c
    • Michael Paquier's avatar
      Add support for more progress reporting in COPY · 9d2d4570
      Michael Paquier authored
      The command (TO or FROM), its type (file, pipe, program or callback),
      and the number of tuples excluded by a WHERE clause in COPY FROM are
      added to the progress reporting already available.
      
      The column "lines_processed" is renamed to "tuples_processed" to
      disambiguate the meaning of this column in the cases of CSV and BINARY
      COPY and to be more consistent with the other catalog progress views.
      
      Bump catalog version, again.
      
      Author: Matthias van de Meent
      Reviewed-by: Michael Paquier, Justin Pryzby, Bharath Rupireddy, Josef
      Šimánek, Tomas Vondra
      Discussion: https://postgr.es/m/CAEze2WiOcgdH4aQA8NtZq-4dgvnJzp8PohdeKchPkhMY-jWZXA@mail.gmail.com
      9d2d4570
    • Michael Paquier's avatar
      Remove support for SSL compression · f9264d15
      Michael Paquier authored
      PostgreSQL disabled compression as of e3bdb2d9 and the documentation
      recommends against using it since.  Additionally, SSL compression has
      been disabled in OpenSSL since version 1.1.0, and was disabled in many
      distributions long before that.  The most recent TLS version, TLSv1.3,
      disallows compression at the protocol level.
      
      This commit removes the feature itself, removing support for the libpq
      parameter sslcompression (parameter still listed for compatibility
      reasons with existing connection strings, just ignored), and removes
      the equivalent field in pg_stat_ssl and de facto PgBackendSSLStatus.
      
      Note that, on top of removing the ability to activate compression by
      configuration, compression is actively disabled in both frontend and
      backend to avoid overrides from local configurations.
      
      A TAP test is added for deprecated SSL parameters to check after
      backwards compatibility.
      
      Bump catalog version.
      
      Author: Daniel Gustafsson
      Reviewed-by: Peter Eisentraut, Magnus Hagander, Michael Paquier
      Discussion:  https://postgr.es/m/7E384D48-11C5-441B-9EC3-F7DB1F8518F6@yesql.se
      f9264d15
  20. 20 Feb, 2021 1 commit
  21. 29 Jan, 2021 1 commit
  22. 25 Jan, 2021 1 commit
    • Robert Haas's avatar
      Remove CheckpointLock. · d18e7566
      Robert Haas authored
      Up until now, we've held this lock when performing a checkpoint or
      restartpoint, but commit 076a055a back
      in 2004 and commit 7e48b77b from 2009,
      taken together, have removed all need for this. In the present code,
      there's only ever one process entitled to attempt a checkpoint: either
      the checkpointer, during normal operation, or the postmaster, during
      single-user operation. So, we don't need the lock.
      
      One possible concern in making this change is that it means that
      a substantial amount of code where HOLD_INTERRUPTS() was previously
      in effect due to the preceding LWLockAcquire() will now be
      running without that. This could mean that ProcessInterrupts()
      gets called in places from which it didn't before. However, this
      seems unlikely to do very much, because the checkpointer doesn't
      have any signal mapped to die(), so it's not clear how,
      for example, ProcDiePending = true could happen in the first
      place. Similarly with ClientConnectionLost and recovery conflicts.
      
      Also, if there are any such problems, we might want to fix them
      rather than reverting this, since running lots of code with
      interrupt handling suspended is generally bad.
      
      Patch by me, per an inquiry by Amul Sul. Review by Tom Lane
      and Michael Paquier.
      
      Discussion: http://postgr.es/m/CAAJ_b97XnBBfYeSREDJorFsyoD1sHgqnNuCi=02mNQBUMnA=FA@mail.gmail.com
      d18e7566
  23. 17 Jan, 2021 1 commit
  24. 07 Jan, 2021 1 commit
  25. 06 Jan, 2021 1 commit
  26. 24 Dec, 2020 1 commit
  27. 02 Dec, 2020 1 commit
  28. 01 Dec, 2020 1 commit
  29. 29 Oct, 2020 1 commit
    • Amit Kapila's avatar
      Track statistics for streaming of changes from ReorderBuffer. · 8e90ec55
      Amit Kapila authored
      This adds the statistics about transactions streamed to the decoding
      output plugin from ReorderBuffer. Users can query the
      pg_stat_replication_slots view to check these stats and call
      pg_stat_reset_replication_slot to reset the stats of a particular slot.
      Users can pass NULL in pg_stat_reset_replication_slot to reset stats of
      all the slots.
      
      Commit 98681675 has added the basic infrastructure to capture the stats
      of slot and this commit extends the statistics collector to track
      additional information about slots.
      
      Bump the catversion as we have added new columns in the catalog entry.
      
      Author: Ajin Cherian and Amit Kapila
      Reviewed-by: Sawada Masahiko and Dilip Kumar
      Discussion: https://postgr.es/m/CAA4eK1+chpEomLzgSoky-D31qev19AmECNiEAietPQUGEFhtVA@mail.gmail.com
      8e90ec55
  30. 28 Oct, 2020 1 commit
  31. 27 Oct, 2020 1 commit
  32. 20 Oct, 2020 1 commit
  33. 08 Oct, 2020 1 commit
  34. 03 Oct, 2020 1 commit
    • Peter Eisentraut's avatar
      Improve <xref> vs. <command> formatting in the documentation · 9081bddb
      Peter Eisentraut authored
      SQL commands are generally marked up as <command>, except when a link
      to a reference page is used using <xref>.  But the latter doesn't
      create monospace markup, so this looks strange especially when a
      paragraph contains a mix of links and non-links.
      
      We considered putting <command> in the <refentrytitle> on the target
      side, but that creates some formatting side effects elsewhere.
      Generally, it seems safer to solve this on the link source side.
      
      We can't put the <xref> inside the <command>; the DTD doesn't allow
      this.  DocBook 5 would allow the <command> to have the linkend
      attribute itself, but we are not there yet.
      
      So to solve this for now, convert the <xref>s to <link> plus
      <command>.  This gives the correct look and also gives some more
      flexibility what we can put into the link text (e.g., subcommands or
      other clauses).  In the future, these could then be converted to
      DocBook 5 style.
      
      I haven't converted absolutely all xrefs to SQL command reference
      pages, only those where we care about the appearance of the link text
      or where it was otherwise appropriate to make the appearance match a
      bit better.  Also in some cases, the links where repetitive, so in
      those cases the links where just removed and replaced by a plain
      <command>.  In cases where we just want the link and don't
      specifically care about the generated link text (typically phrased
      "for further information see <xref ...>") the xref is kept.
      Reported-by: default avatarDagfinn Ilmari Mannsåker <ilmari@ilmari.org>
      Discussion: https://www.postgresql.org/message-id/flat/87o8pco34z.fsf@wibble.ilmari.org
      9081bddb
  35. 02 Oct, 2020 1 commit
    • Fujii Masao's avatar
      Add pg_stat_wal statistics view. · 8d9a9359
      Fujii Masao authored
      This view shows the statistics about WAL activity. Currently it has only
      two columns: wal_buffers_full and stats_reset. wal_buffers_full column
      indicates the number of times WAL data was written to the disk because
      WAL buffers got full. This information is useful when tuning wal_buffers.
      stats_reset column indicates the time at which these statistics were
      last reset.
      
      pg_stat_wal view is also the basic infrastructure to expose other
      various statistics about WAL activity later.
      
      Bump PGSTAT_FILE_FORMAT_ID due to the change in pgstat format.
      
      Bump catalog version.
      
      Author: Masahiro Ikeda
      Reviewed-by: Takayuki Tsunakawa, Kyotaro Horiguchi, Amit Kapila, Fujii Masao
      Discussion: https://postgr.es/m/188bd3f2d2233cf97753b5ced02bb050@oss.nttdata.com
      8d9a9359
  36. 21 Sep, 2020 1 commit
  37. 03 Sep, 2020 1 commit
    • Amit Kapila's avatar
      Add support for streaming to built-in logical replication. · 46482432
      Amit Kapila authored
      To add support for streaming of in-progress transactions into the
      built-in logical replication, we need to do three things:
      
      * Extend the logical replication protocol, so identify in-progress
      transactions, and allow adding additional bits of information (e.g.
      XID of subtransactions).
      
      * Modify the output plugin (pgoutput) to implement the new stream
      API callbacks, by leveraging the extended replication protocol.
      
      * Modify the replication apply worker, to properly handle streamed
      in-progress transaction by spilling the data to disk and then
      replaying them on commit.
      
      We however must explicitly disable streaming replication during
      replication slot creation, even if the plugin supports it. We
      don't need to replicate the changes accumulated during this phase,
      and moreover we don't have a replication connection open so we
      don't have where to send the data anyway.
      
      Author: Tomas Vondra, Dilip Kumar and Amit Kapila
      Reviewed-by: Amit Kapila, Kuntal Ghosh and Ajin Cherian
      Tested-by: Neha Sharma, Mahendra Singh Thalor and Ajin Cherian
      Discussion: https://postgr.es/m/688b0b7f-2f6c-d827-c27b-216a8e3ea700@2ndquadrant.com
      46482432