File tree Expand file tree Collapse file tree 3 files changed +21
-21
lines changed Expand file tree Collapse file tree 3 files changed +21
-21
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,26 @@ pgstat_drop_database(Oid databaseid)
5454 pgstat_send (& msg , sizeof (msg ));
5555}
5656
57+ /*
58+ * Called from autovacuum.c to report startup of an autovacuum process.
59+ * We are called before InitPostgres is done, so can't rely on MyDatabaseId;
60+ * the db OID must be passed in, instead.
61+ */
62+ void
63+ pgstat_report_autovac (Oid dboid )
64+ {
65+ PgStat_MsgAutovacStart msg ;
66+
67+ if (pgStatSock == PGINVALID_SOCKET )
68+ return ;
69+
70+ pgstat_setheader (& msg .m_hdr , PGSTAT_MTYPE_AUTOVAC_START );
71+ msg .m_databaseid = dboid ;
72+ msg .m_start_time = GetCurrentTimestamp ();
73+
74+ pgstat_send (& msg , sizeof (msg ));
75+ }
76+
5777/*
5878 * Tell the collector about a Hot Standby recovery conflict.
5979 */
Original file line number Diff line number Diff line change @@ -167,26 +167,6 @@ pgstat_drop_relation(Oid relid)
167167}
168168#endif /* NOT_USED */
169169
170- /*
171- * Called from autovacuum.c to report startup of an autovacuum process.
172- * We are called before InitPostgres is done, so can't rely on MyDatabaseId;
173- * the db OID must be passed in, instead.
174- */
175- void
176- pgstat_report_autovac (Oid dboid )
177- {
178- PgStat_MsgAutovacStart msg ;
179-
180- if (pgStatSock == PGINVALID_SOCKET )
181- return ;
182-
183- pgstat_setheader (& msg .m_hdr , PGSTAT_MTYPE_AUTOVAC_START );
184- msg .m_databaseid = dboid ;
185- msg .m_start_time = GetCurrentTimestamp ();
186-
187- pgstat_send (& msg , sizeof (msg ));
188- }
189-
190170/*
191171 * Tell the collector about the table we just vacuumed.
192172 */
Original file line number Diff line number Diff line change @@ -1025,6 +1025,7 @@ extern void pgstat_send_checkpointer(void);
10251025 */
10261026
10271027extern void pgstat_drop_database (Oid databaseid );
1028+ extern void pgstat_report_autovac (Oid dboid );
10281029extern void pgstat_report_recovery_conflict (int reason );
10291030extern void pgstat_report_deadlock (void );
10301031extern void pgstat_report_checksum_failures_in_db (Oid dboid , int failurecount );
@@ -1060,7 +1061,6 @@ extern PgStat_BackendFunctionEntry *find_funcstat_entry(Oid func_id);
10601061
10611062extern void pgstat_relation_init (Relation rel );
10621063
1063- extern void pgstat_report_autovac (Oid dboid );
10641064extern void pgstat_report_vacuum (Oid tableoid , bool shared ,
10651065 PgStat_Counter livetuples , PgStat_Counter deadtuples );
10661066extern void pgstat_report_analyze (Relation rel ,
You can’t perform that action at this time.
0 commit comments