How to check if checkpoint is finished in sql script?

From: Yi Sun <yinan81(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How to check if checkpoint is finished in sql script?
Date: 2022-09-05 08:55:28
Message-ID: CABWY_HA=4H7DBj_d11whAckeuRHaY45407YeeqWpm-b2-PJEYg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello all,

We want to restart postgresql 3 nodes(2 replica nodes) by ansible as below
steps:
1. Restart 2 replica nodes one by one
2. Run checkpoint in the leader node
3. Once checkpoint finished, restart the leader node

How to check if the checkpoint is finished in sql script please? We know
that the log file will show it, but we want to check it in sql then can
easily be used by ansible, thanks

Best regards
Oliver Sun

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2022-09-05 10:05:35 Re: How to check if checkpoint is finished in sql script?
Previous Message sivapostgres@yahoo.com 2022-09-05 06:02:51 Re: Creating constraint dynamically