Re: pg_stat_io_histogram

From: Andres Freund <andres(at)anarazel(dot)de>
To: Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>
Cc: Tomas Vondra <tomas(at)vondra(dot)me>, Ants Aasma <ants(dot)aasma(at)cybertec(dot)at>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_stat_io_histogram
Date: 2026-03-17 14:17:02
Message-ID: ddta6kbyit4ep5lwbgiohukeuihlpsn6fgqzvivego5okq7znj@t43tealb6htn
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2026-03-17 13:13:59 +0100, Jakub Wartak wrote:
> 1. Concerns about memory use. With v7 I had couple of ideas, and with those
> the memory use is really minimized as long as the code is still simple
> (so nothing fancy, just some ideas to trim stuff and dynamically allocate
> memory). I hope those reduce memory footprint to acceptable levels, see my
> earlier description for v7.

Personally I unfortunately continue to think that storing lots of values that
are never anything but zero isn't a good idea once you have more than a
handful of kB. Storing pointless data is something different than increasing
memory usage with actual information.

I still think you should just count the number of histograms needed, have an
array [object][context][op] with the associated histogram "offset" and then
increment the associated offset. It'll add an indirection at count time, but
no additional branches.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2026-03-17 14:26:57 Re: Add starelid, attnum to pg_stats and leverage this in pg_dump
Previous Message Tom Lane 2026-03-17 14:12:07 Re: Need help debugging SIGBUS crashes