1. 25 Mar, 2021 2 commits
    • Fujii Masao's avatar
      Fix bug in WAL replay of COMMIT_TS_SETTS record. · 438fc4a3
      Fujii Masao authored
      Previously the WAL replay of COMMIT_TS_SETTS record called
      TransactionTreeSetCommitTsData() with the argument write_xlog=true,
      which generated and wrote new COMMIT_TS_SETTS record.
      This should not be acceptable because it's during recovery.
      
      This commit fixes the WAL replay of COMMIT_TS_SETTS record
      so that it calls TransactionTreeSetCommitTsData() with write_xlog=false
      and doesn't generate new WAL during recovery.
      
      Back-patch to all supported branches.
      Reported-by: default avatarlx zou <zoulx1982@163.com>
      Author: Fujii Masao
      Reviewed-by: Alvaro Herrera
      Discussion: https://postgr.es/m/16931-620d0f2fdc6108f1@postgresql.org
      438fc4a3
    • Fujii Masao's avatar
      Improve connection denied error message during recovery. · df938449
      Fujii Masao authored
      Previously when an archive recovery or a standby was starting and
      reached the consistent recovery state but hot_standby was configured
      to off, the error message when a client connectted was "the database
      system is starting up", which was needless confusing and not really
      all that accurate either.
      
      This commit improves the connection denied error message during
      recovery, as follows, so that the users immediately know that their
      servers are configured to deny those connections.
      
      - If hot_standby is disabled, the error message "the database system
        is not accepting connections" and the detail message "Hot standby
        mode is disabled." are output when clients connect while an archive
        recovery or a standby is running.
      
      - If hot_standby is enabled, the error message "the database system
        is not yet accepting connections" and the detail message
        "Consistent recovery state has not been yet reached." are output
        when clients connect until the consistent recovery state is reached
        and postmaster starts accepting read only connections.
      
      This commit doesn't change the connection denied error message of
      "the database system is starting up" during normal server startup and
      crash recovery. Because it's still suitable for those situations.
      
      Author: James Coleman
      Reviewed-by: Alvaro Herrera, Andres Freund, David Zhang, Tom Lane, Fujii Masao
      Discussion: https://postgr.es/m/CAAaqYe8h5ES_B=F_zDT+Nj9XU7YEwNhKhHA2RE4CFhAQ93hfig@mail.gmail.com
      df938449
  2. 24 Mar, 2021 13 commits
  3. 23 Mar, 2021 14 commits
  4. 22 Mar, 2021 11 commits