1. 23 Mar, 2017 6 commits
    • Peter Eisentraut's avatar
      Assorted compilation and test fixes · 128e6ee0
      Peter Eisentraut authored
      related to 7c4f5240, per build farm
      
      Author: Petr Jelinek <petr.jelinek@2ndquadrant.com>
      128e6ee0
    • Simon Riggs's avatar
      Minor spelling correction in comment · 232c5322
      Simon Riggs authored
      Jon Nelson
      232c5322
    • Simon Riggs's avatar
      Replication lag tracking for walsenders · 6912acc0
      Simon Riggs authored
      Adds write_lag, flush_lag and replay_lag cols to pg_stat_replication.
      
      Implements a lag tracker module that reports the lag times based upon
      measurements of the time taken for recent WAL to be written, flushed and
      replayed and for the sender to hear about it. These times
      represent the commit lag that was (or would have been) introduced by each
      synchronous commit level, if the remote server was configured as a
      synchronous standby.  For an asynchronous standby, the replay_lag column
      approximates the delay before recent transactions became visible to queries.
      If the standby server has entirely caught up with the sending server and
      there is no more WAL activity, the most recently measured lag times will
      continue to be displayed for a short time and then show NULL.
      
      Physical replication lag tracking is automatic. Logical replication tracking
      is possible but is the responsibility of the logical decoding plugin.
      Tracking is a private module operating within each walsender individually,
      with values reported to shared memory. Module not used outside of walsender.
      
      Design and code is good enough now to commit - kudos to the author.
      In many ways a difficult topic, with important and subtle behaviour so this
      shoudl be expected to generate discussion and multiple open items: Test now!
      
      Author: Thomas Munro, following designs by Fujii Masao and Simon Riggs
      Review: Simon Riggs, Ian Barwick and Craig Ringer
      6912acc0
    • Peter Eisentraut's avatar
      Logical replication support for initial data copy · 7c4f5240
      Peter Eisentraut authored
      Add functionality for a new subscription to copy the initial data in the
      tables and then sync with the ongoing apply process.
      
      For the copying, add a new internal COPY option to have the COPY source
      data provided by a callback function.  The initial data copy works on
      the subscriber by receiving COPY data from the publisher and then
      providing it locally into a COPY that writes to the destination table.
      
      A WAL receiver can now execute full SQL commands.  This is used here to
      obtain information about tables and publications.
      
      Several new options were added to CREATE and ALTER SUBSCRIPTION to
      control whether and when initial table syncing happens.
      
      Change pg_dump option --no-create-subscription-slots to
      --no-subscription-connect and use the new CREATE SUBSCRIPTION
      ... NOCONNECT option for that.
      
      Author: Petr Jelinek <petr.jelinek@2ndquadrant.com>
      Tested-by: default avatarErik Rijkers <er@xs4all.nl>
      7c4f5240
    • Magnus Hagander's avatar
      Fix grammar in comment · 707576b5
      Magnus Hagander authored
      Author: Emil Iggland
      707576b5
    • Stephen Frost's avatar
      Expose waitforarchive option through pg_stop_backup() · 017e4f25
      Stephen Frost authored
      Internally, we have supported the option to either wait for all of the
      WAL associated with a backup to be archived, or to return immediately.
      This option is useful to users of pg_stop_backup() as well, when they
      are reading the stop backup record position and checking that the WAL
      they need has been archived independently.
      
      This patch adds an additional, optional, argument to pg_stop_backup()
      which allows the user to indicate if they wish to wait for the WAL to be
      archived or not.  The default matches current behavior, which is to
      wait.
      
      Author: David Steele, with some minor changes, doc updates by me.
      Reviewed by: Takayuki Tsunakawa, Fujii Masao
      Discussion: https://postgr.es/m/758e3fd1-45b4-5e28-75cd-e9e7f93a4c02@pgmasters.net
      017e4f25
  2. 22 Mar, 2017 16 commits
  3. 21 Mar, 2017 14 commits
  4. 20 Mar, 2017 4 commits