Time of completion of last Postgres Checkpoint



  • Is there a psql way to get the completion time (and other details) for latest Postgres checkpoint?



  • You can get the details of the latest checkpoint, including the time, from the pg_control_checkpoint() function:

    SELECT * FROM pg_control_checkpoint() \gx
    

    ─[ RECORD 1 ]────────┬─────────────────────────
    checkpoint_lsn │ B/AF0C2EB8
    redo_lsn │ B/AF0C2E80
    redo_wal_file │ 000000040000000B000000AF
    timeline_id │ 4
    prev_timeline_id │ 4
    full_page_writes │ t
    next_xid │ 0:16691338
    next_oid │ 559103
    next_multixact_id │ 16340004
    next_multi_offset │ 326571432
    oldest_xid │ 726
    oldest_xid_dbid │ 1
    oldest_active_xid │ 16691338
    oldest_multi_xid │ 1
    oldest_multi_dbid │ 1
    oldest_commit_ts_xid │ 0
    newest_commit_ts_xid │ 0
    checkpoint_time │ 2022-05-23 08:18:02+02


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2