How to check if checkpoint is finished in sql script?
How to check if checkpoint is finished in sql script?
От:
Yi Sun <yinan81@gmail.com>
Дата:
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
Oliver Sun
Re: How to check if checkpoint is finished in sql script?
От:
hubert depesz lubaczewski <depesz@depesz.com>
Дата:
On Mon, Sep 05, 2022 at 04:55:28PM +0800, Yi Sun wrote: > 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 Well, if the command "checkpoint" finished, and returned, and there is no error - then checkpoint has finished. Best regards, depesz