can_hibernate = BgBufferSync(&wb_context);
/* Report pending statistics to the cumulative stats system */
- pgstat_send_bgwriter();
+ pgstat_report_bgwriter();
if (FirstCallSinceLastCheckpoint())
{
CheckArchiveTimeout();
/* Report pending statistics to the cumulative stats system */
- pgstat_send_checkpointer();
- pgstat_send_wal(true);
+ pgstat_report_checkpointer();
+ pgstat_report_wal(true);
/*
* If any checkpoint flags have been set, redo the loop to handle the
*/
PendingCheckpointerStats.m_requested_checkpoints++;
ShutdownXLOG(0, 0);
- pgstat_send_checkpointer();
- pgstat_send_wal(true);
+ pgstat_report_checkpointer();
+ pgstat_report_wal(true);
/* Normal exit from the checkpointer is here */
proc_exit(0); /* done */
CheckArchiveTimeout();
/* Report interim statistics to the cumulative stats system */
- pgstat_send_checkpointer();
+ pgstat_report_checkpointer();
/*
* This sleep used to be connected to bgwriter_delay, typically 200ms.
* Tell the cumulative stats system about the WAL file that we
* successfully archived
*/
- pgstat_send_archiver(xlog, false);
+ pgstat_report_archiver(xlog, false);
break; /* out of inner retry loop */
}
* Tell the cumulative stats system about the WAL file that we
* failed to archive
*/
- pgstat_send_archiver(xlog, true);
+ pgstat_report_archiver(xlog, true);
if (++failures >= NUM_ARCHIVE_RETRIES)
{
pgstat_send_funcstats();
/* Send WAL statistics */
- pgstat_send_wal(true);
+ pgstat_report_wal(true);
/* Finally send SLRU statistics */
pgstat_send_slru();
left_till_hibernate--;
/* report pending statistics to the cumulative stats system */
- pgstat_send_wal(false);
+ pgstat_report_wal(false);
/*
* Sleep until we are signaled or WalWriterDelay has elapsed. If we
/*
* Force reporting remaining WAL statistics at process exit.
*
- * Since pgstat_send_wal is invoked with 'force' is false in main loop
+ * Since pgstat_report_wal is invoked with 'force' is false in main loop
* to avoid overloading the cumulative stats system, there may exist
* unreported stats counters for the WAL writer.
*/
- pgstat_send_wal(true);
+ pgstat_report_wal(true);
proc_exit(0);
}
* Report archiver statistics
*/
void
-pgstat_send_archiver(const char *xlog, bool failed)
+pgstat_report_archiver(const char *xlog, bool failed)
{
PgStat_MsgArchiver msg;
* Report bgwriter statistics
*/
void
-pgstat_send_bgwriter(void)
+pgstat_report_bgwriter(void)
{
/* We assume this initializes to zeroes */
static const PgStat_MsgBgWriter all_zeroes;
* Report checkpointer statistics
*/
void
-pgstat_send_checkpointer(void)
+pgstat_report_checkpointer(void)
{
/* We assume this initializes to zeroes */
static const PgStat_MsgCheckpointer all_zeroes;
/*
* WAL usage counters saved from pgWALUsage at the previous call to
- * pgstat_send_wal(). This is used to calculate how much WAL usage
- * happens between pgstat_send_wal() calls, by subtracting
+ * pgstat_report_wal(). This is used to calculate how much WAL usage
+ * happens between pgstat_report_wal() calls, by subtracting
* the previous counters from the current ones.
*/
static WalUsage prevWalUsage;
* passed since last one was sent to reach PGSTAT_STAT_INTERVAL.
*/
void
-pgstat_send_wal(bool force)
+pgstat_report_wal(bool force)
{
static TimestampTz sendTime = 0;
pgstat_wal_initialize(void)
{
/*
- * Initialize prevWalUsage with pgWalUsage so that pgstat_send_wal() can
+ * Initialize prevWalUsage with pgWalUsage so that pgstat_report_wal() can
* calculate how much pgWalUsage counters are increased by subtracting
* prevWalUsage from pgWalUsage.
*/
* Functions in pgstat_archiver.c
*/
-extern void pgstat_send_archiver(const char *xlog, bool failed);
+extern void pgstat_report_archiver(const char *xlog, bool failed);
/*
* Functions in pgstat_bgwriter.c
*/
-extern void pgstat_send_bgwriter(void);
+extern void pgstat_report_bgwriter(void);
/*
* Functions in pgstat_checkpointer.c
*/
-extern void pgstat_send_checkpointer(void);
+extern void pgstat_report_checkpointer(void);
/*
* Functions in pgstat_wal.c
*/
-extern void pgstat_send_wal(bool force);
+extern void pgstat_report_wal(bool force);
/*