pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedHow to check if checkpoint is finished in sql script?
2+ messages / 2 participants
[nested] [flat]
* How to check if checkpoint is finished in sql script?
@ 2022-09-05 08:55 Yi Sun <yinan81@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Yi Sun @ 2022-09-05 08:55 UTC (permalink / raw)
To: 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
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: How to check if checkpoint is finished in sql script?
@ 2022-09-05 10:05 hubert depesz lubaczewski <depesz@depesz.com>
parent: Yi Sun <yinan81@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: hubert depesz lubaczewski @ 2022-09-05 10:05 UTC (permalink / raw)
To: Yi Sun <yinan81@gmail.com>; +Cc: pgsql-general
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2022-09-05 10:05 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-09-05 08:55 How to check if checkpoint is finished in sql script? Yi Sun <yinan81@gmail.com>
2022-09-05 10:05 ` hubert depesz lubaczewski <depesz@depesz.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox