1. 16 Mar, 2021 6 commits
  2. 15 Mar, 2021 6 commits
  3. 13 Mar, 2021 8 commits
  4. 12 Mar, 2021 17 commits
  5. 11 Mar, 2021 3 commits
    • Peter Geoghegan's avatar
      Save a few cycles during nbtree VACUUM. · 7bb97211
      Peter Geoghegan authored
      Avoid calling RelationGetNumberOfBlocks() unnecessarily in the common
      case where there are no deleted but not yet recycled pages to recycle
      during a cleanup-only nbtree VACUUM operation.
      
      Follow-up to commit e5d8a999, which (among other things) taught the
      "skip full scan" nbtree VACUUM mechanism to only trigger a full index
      scan when the absolute number of deleted pages in the index is
      considered excessive.
      7bb97211
    • Peter Geoghegan's avatar
      Add back vacuum_cleanup_index_scale_factor parameter. · effdd3f3
      Peter Geoghegan authored
      Commit 9f3665fb removed the vacuum_cleanup_index_scale_factor storage
      parameter.  However, that creates dump/reload hazards when moving across
      major versions.
      
      Add back the vacuum_cleanup_index_scale_factor parameter (though not the
      GUC of the same name) purely to avoid problems when using tools like
      pg_upgrade.  The parameter remains disabled and undocumented.
      
      No backpatch to Postgres 13, since vacuum_cleanup_index_scale_factor was
      only disabled by REL_13_STABLE's version of master branch commit
      9f3665fb in the first place -- the parameter already looks like this on
      REL_13_STABLE.
      
      Discussion: https://postgr.es/m/YEm/a3Ko3nKnBuVq@paquier.xyz
      effdd3f3
    • Robert Haas's avatar
      Be clear about whether a recovery pause has taken effect. · 32fd2b57
      Robert Haas authored
      Previously, the code and documentation seem to have essentially
      assumed than a call to pg_wal_replay_pause() would take place
      immediately, but that's not the case, because we only check for a
      pause in certain places. This means that a tool that uses this
      function and then wants to do something else afterward that is
      dependent on the pause having taken effect doesn't know how long it
      needs to wait to be sure that no more WAL is going to be replayed.
      
      To avoid that, add a new function pg_get_wal_replay_pause_state()
      which returns either 'not paused', 'paused requested', or 'paused'.
      After calling pg_wal_replay_pause() the status will immediate change
      from 'not paused' to 'pause requested'; when the startup process
      has noticed this, the status will change to 'pause'.  For backward
      compatibility, pg_is_wal_replay_paused() still exists and returns
      the same thing as before: true if a pause has been requested,
      whether or not it has taken effect yet; and false if not.
      The documentation is updated to clarify.
      
      To improve the changes that a pause request is quickly confirmed
      effective, adjust things so that WaitForWALToBecomeAvailable will
      swiftly reach a call to recoveryPausesHere() when a pause request
      is made.
      
      Dilip Kumar, reviewed by Simon Riggs, Kyotaro Horiguchi, Yugo Nagata,
      Masahiko Sawada, and Bharath Rupireddy.
      
      Discussion: http://postgr.es/m/CAFiTN-vcLLWEm8Zr%3DYK83rgYrT9pbC8VJCfa1kY9vL3AUPfu6g%40mail.gmail.com
      32fd2b57