Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oV8z6-00076Z-Pq for pgsql-general@arkaria.postgresql.org; Mon, 05 Sep 2022 10:05:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oV8z4-00014h-VH for pgsql-general@arkaria.postgresql.org; Mon, 05 Sep 2022 10:05:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oV8z4-00014X-HI for pgsql-general@lists.postgresql.org; Mon, 05 Sep 2022 10:05:38 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oV8z3-0002Og-8N for pgsql-general@postgresql.org; Mon, 05 Sep 2022 10:05:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=3GImglj4dC4ZCWYFQDOd0lIT1eSNcIX7wLaJXQXyZQQ=; b=Zsrc/aQtLcFxu3UGNCaI56ItNP hYliyVnGdM0t5H285UoEaDswdsi0YfUl4Xuw84xpU0PUczlQo4Zyrt7D7ZwQ7dvesUMbqdRCXdhfP F9QfCyaGs+h8nyes5iTlEK+WZXxH7tk2mi44xgPIatXiFS6DwjoolEr5t5I5Xq9+gF9g=; Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by depesz.com with esmtpa (Exim 4.92) (envelope-from ) id 1oV8z1-0006re-G2; Mon, 05 Sep 2022 12:05:35 +0200 Date: Mon, 5 Sep 2022 12:05:35 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: Yi Sun Cc: pgsql-general@postgresql.org Subject: Re: How to check if checkpoint is finished in sql script? Message-ID: <20220905100535.GA17522@depesz.com> Reply-To: depesz@depesz.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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