@@ -231,8 +231,8 @@ pgstat_report_vacuum(Oid tableoid, bool shared,
231231 shtabentry = (PgStatShared_Relation * ) entry_ref -> shared_stats ;
232232 tabentry = & shtabentry -> stats ;
233233
234- tabentry -> n_live_tuples = livetuples ;
235- tabentry -> n_dead_tuples = deadtuples ;
234+ tabentry -> live_tuples = livetuples ;
235+ tabentry -> dead_tuples = deadtuples ;
236236
237237 /*
238238 * It is quite possible that a non-aggressive VACUUM ended up skipping
@@ -244,16 +244,16 @@ pgstat_report_vacuum(Oid tableoid, bool shared,
244244 * autovacuum. An anti-wraparound autovacuum will catch any persistent
245245 * stragglers.
246246 */
247- tabentry -> inserts_since_vacuum = 0 ;
247+ tabentry -> ins_since_vacuum = 0 ;
248248
249249 if (IsAutoVacuumWorkerProcess ())
250250 {
251- tabentry -> autovac_vacuum_timestamp = ts ;
252- tabentry -> autovac_vacuum_count ++ ;
251+ tabentry -> last_autovacuum_time = ts ;
252+ tabentry -> autovacuum_count ++ ;
253253 }
254254 else
255255 {
256- tabentry -> vacuum_timestamp = ts ;
256+ tabentry -> last_vacuum_time = ts ;
257257 tabentry -> vacuum_count ++ ;
258258 }
259259
@@ -264,7 +264,7 @@ pgstat_report_vacuum(Oid tableoid, bool shared,
264264 * Report that the table was just analyzed.
265265 *
266266 * Caller must provide new live- and dead-tuples estimates, as well as a
267- * flag indicating whether to reset the changes_since_analyze counter.
267+ * flag indicating whether to reset the mod_since_analyze counter.
268268 */
269269void
270270pgstat_report_analyze (Relation rel ,
@@ -318,25 +318,25 @@ pgstat_report_analyze(Relation rel,
318318 shtabentry = (PgStatShared_Relation * ) entry_ref -> shared_stats ;
319319 tabentry = & shtabentry -> stats ;
320320
321- tabentry -> n_live_tuples = livetuples ;
322- tabentry -> n_dead_tuples = deadtuples ;
321+ tabentry -> live_tuples = livetuples ;
322+ tabentry -> dead_tuples = deadtuples ;
323323
324324 /*
325- * If commanded, reset changes_since_analyze to zero. This forgets any
325+ * If commanded, reset mod_since_analyze to zero. This forgets any
326326 * changes that were committed while the ANALYZE was in progress, but we
327327 * have no good way to estimate how many of those there were.
328328 */
329329 if (resetcounter )
330- tabentry -> changes_since_analyze = 0 ;
330+ tabentry -> mod_since_analyze = 0 ;
331331
332332 if (IsAutoVacuumWorkerProcess ())
333333 {
334- tabentry -> autovac_analyze_timestamp = GetCurrentTimestamp ();
335- tabentry -> autovac_analyze_count ++ ;
334+ tabentry -> last_autoanalyze_time = GetCurrentTimestamp ();
335+ tabentry -> autoanalyze_count ++ ;
336336 }
337337 else
338338 {
339- tabentry -> analyze_timestamp = GetCurrentTimestamp ();
339+ tabentry -> last_analyze_time = GetCurrentTimestamp ();
340340 tabentry -> analyze_count ++ ;
341341 }
342342
@@ -798,22 +798,22 @@ pgstat_relation_flush_cb(PgStat_EntryRef *entry_ref, bool nowait)
798798 */
799799 if (lstats -> t_counts .t_truncdropped )
800800 {
801- tabentry -> n_live_tuples = 0 ;
802- tabentry -> n_dead_tuples = 0 ;
803- tabentry -> inserts_since_vacuum = 0 ;
801+ tabentry -> live_tuples = 0 ;
802+ tabentry -> dead_tuples = 0 ;
803+ tabentry -> ins_since_vacuum = 0 ;
804804 }
805805
806- tabentry -> n_live_tuples += lstats -> t_counts .t_delta_live_tuples ;
807- tabentry -> n_dead_tuples += lstats -> t_counts .t_delta_dead_tuples ;
808- tabentry -> changes_since_analyze += lstats -> t_counts .t_changed_tuples ;
809- tabentry -> inserts_since_vacuum += lstats -> t_counts .t_tuples_inserted ;
806+ tabentry -> live_tuples += lstats -> t_counts .t_delta_live_tuples ;
807+ tabentry -> dead_tuples += lstats -> t_counts .t_delta_dead_tuples ;
808+ tabentry -> mod_since_analyze += lstats -> t_counts .t_changed_tuples ;
809+ tabentry -> ins_since_vacuum += lstats -> t_counts .t_tuples_inserted ;
810810 tabentry -> blocks_fetched += lstats -> t_counts .t_blocks_fetched ;
811811 tabentry -> blocks_hit += lstats -> t_counts .t_blocks_hit ;
812812
813- /* Clamp n_live_tuples in case of negative delta_live_tuples */
814- tabentry -> n_live_tuples = Max (tabentry -> n_live_tuples , 0 );
815- /* Likewise for n_dead_tuples */
816- tabentry -> n_dead_tuples = Max (tabentry -> n_dead_tuples , 0 );
813+ /* Clamp live_tuples in case of negative delta_live_tuples */
814+ tabentry -> live_tuples = Max (tabentry -> live_tuples , 0 );
815+ /* Likewise for dead_tuples */
816+ tabentry -> dead_tuples = Max (tabentry -> dead_tuples , 0 );
817817
818818 pgstat_unlock_entry (entry_ref );
819819
0 commit comments