| From: | Sami Imseih <samimseih(at)gmail(dot)com> |
|---|---|
| To: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
| Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Lukas Fittl <lukas(at)fittl(dot)com> |
| Subject: | Re: pgstat: Flush some statistics within running transactions, take 2 |
| Date: | 2026-08-24 12:26:38 |
| Message-ID: | CAA5RZ0sK7iNeJ2g8GNaEE5L20cOv-frw7hcM4nYeuVv4gQy_iA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> /* 24 | 8 */ PgStat_Counter tuples_hot_updated;
> /* 32 | 8 */ PgStat_Counter tuples_newpage_updated;
> /* 40 | 1 */ _Bool truncdropped;
> /* XXX 7-byte hole */
> /* 48 | 8 */ PgStat_Counter delta_live_tuples;
> /* 56 | 8 */ PgStat_Counter delta_dead_tuples;
> /* 64 | 8 */ PgStat_Counter changed_tuples;
right, These counters should be confined to PgStat_Counter fields,
and we can similar to what was done in 3cd3a039da7 to ensure
that the struct has no padding, using StaticAssertDecl().
truncdropped should be moved under PgStat_RelationStatus
directly, since it's not a counter anyhow.
I still think this is a much better way to organize the data and retain the
capability to do memcmp() rather than field-by-field comparisons.
WDYT?
--
Sami
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Rowley | 2026-08-24 12:27:27 | How to best find unexpected WARNINGs in the TAP tests? |
| Previous Message | Andres Freund | 2026-08-24 12:25:20 | Re: [PATCH] bufmgr: tighten LWLock:BufferMapping on InvalidateBuffer |