File tree 3 files changed +21
-21
lines changed
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)
54
54
pgstat_send (& msg , sizeof (msg ));
55
55
}
56
56
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
+
57
77
/*
58
78
* Tell the collector about a Hot Standby recovery conflict.
59
79
*/
Original file line number Diff line number Diff line change @@ -167,26 +167,6 @@ pgstat_drop_relation(Oid relid)
167
167
}
168
168
#endif /* NOT_USED */
169
169
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
-
190
170
/*
191
171
* Tell the collector about the table we just vacuumed.
192
172
*/
Original file line number Diff line number Diff line change @@ -1025,6 +1025,7 @@ extern void pgstat_send_checkpointer(void);
1025
1025
*/
1026
1026
1027
1027
extern void pgstat_drop_database (Oid databaseid );
1028
+ extern void pgstat_report_autovac (Oid dboid );
1028
1029
extern void pgstat_report_recovery_conflict (int reason );
1029
1030
extern void pgstat_report_deadlock (void );
1030
1031
extern void pgstat_report_checksum_failures_in_db (Oid dboid , int failurecount );
@@ -1060,7 +1061,6 @@ extern PgStat_BackendFunctionEntry *find_funcstat_entry(Oid func_id);
1060
1061
1061
1062
extern void pgstat_relation_init (Relation rel );
1062
1063
1063
- extern void pgstat_report_autovac (Oid dboid );
1064
1064
extern void pgstat_report_vacuum (Oid tableoid , bool shared ,
1065
1065
PgStat_Counter livetuples , PgStat_Counter deadtuples );
1066
1066
extern void pgstat_report_analyze (Relation rel ,
You can’t perform that action at this time.
0 commit comments