| 267 | + * flag indicating whether to reset the mod_since_analyze counter. | 268 | 268 | */
|
269 | 269 | void
|
270 | 270 | pgstat_report_analyze(Relation rel,
|
@@ -318,25 +318,25 @@ pgstat_report_analyze(Relation rel,
|
318 | 318 | shtabentry = (PgStatShared_Relation *) entry_ref->shared_stats;
|
319 | 319 | tabentry = &shtabentry->stats;
|
320 | 320 |
|
321 |
| - tabentry->n_live_tuples = livetuples; |
322 |
| - tabentry->n_dead_tuples = deadtuples; |
| 321 | + tabentry->live_tuples = livetuples; |
| 322 | + tabentry->dead_tuples = deadtuples; |
323 | 323 |
|
324 | 324 | /*
|
325 |
| - * If commanded, reset changes_since_analyze to zero. This forgets any |
| 325 | + * If commanded, reset mod_since_analyze to zero. This forgets any |
326 | 326 | * changes that were committed while the ANALYZE was in progress, but we
|
327 | 327 | * have no good way to estimate how many of those there were.
|
328 | 328 | */
|
329 | 329 | if (resetcounter)
|
330 |
| - tabentry->changes_since_analyze = 0; |
| 330 | + tabentry->mod_since_analyze = 0; |
331 | 331 |
|
332 | 332 | if (IsAutoVacuumWorkerProcess())
|
333 | 333 | {
|
334 |
| - tabentry->autovac_analyze_timestamp = GetCurrentTimestamp(); |
335 |
| - tabentry->autovac_analyze_count++; |
| 334 | + tabentry->last_autoanalyze_time = GetCurrentTimestamp(); |
| 335 | + tabentry->autoanalyze_count++; |
336 | 336 | }
|
337 | 337 | else
|
338 | 338 | {
|
339 |
| - tabentry->analyze_timestamp = GetCurrentTimestamp(); |
| 339 | + tabentry->last_analyze_time = GetCurrentTimestamp(); |
340 | 340 | tabentry->analyze_count++;
|
341 | 341 | }
|
342 | 342 |
|
@@ -798,22 +798,22 @@ pgstat_relation_flush_cb(PgStat_EntryRef *entry_ref, bool nowait)
|
798 | 798 | */
|
799 | 799 | if (lstats->t_counts.t_truncdropped)
|
800 | 800 | {
|
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; |
804 | 804 | }
|
805 | 805 |
|
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; |
810 | 810 | tabentry->blocks_fetched += lstats->t_counts.t_blocks_fetched;
|
811 | 811 | tabentry->blocks_hit += lstats->t_counts.t_blocks_hit;
|
812 | 812 |
|
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); |
817 | 817 |
|
818 | 818 | pgstat_unlock_entry(entry_ref);
|
819 | 819 |
|
|
0 commit comments