Re: [PATCH] pg_stat_toast - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [PATCH] pg_stat_toast
Date
Msg-id 20211212234113.6rhmqxi5uzgipwx2@alap3.anarazel.de
Whole thread Raw
In response to Re: [PATCH] pg_stat_toast  ("Gunnar \"Nick\" Bluth" <gunnar.bluth@pro-open.de>)
Responses Re: [PATCH] pg_stat_toast
List pgsql-hackers
Hi,

On 2021-12-13 00:00:23 +0100, Gunnar "Nick" Bluth wrote:
> Regarding stats size; it adds one PgStat_BackendToastEntry
> (PgStat_BackendAttrIdentifier + PgStat_ToastCounts, should be 56-64 bytes or
> something in that ballpark) per TOASTable attribute, I can't see that make
> any system break sweat ;-)

That's actually a lot. The problem is that all the stats data for a database
is loaded into private memory for each connection to that database, and that
the stats collector regularly writes out all the stats data for a database.


> A quick run comparing 1.000.000 INSERTs (2 TOASTable columns each) with and
> without "pgstat_track_toast" resulted in 12792.882 ms vs. 12810.557 ms. So
> at least the call overhead seems to be neglectible.

Yea, you'd probably need a few more tables and a few more connections for it
to have a chance of mattering meaningfully.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Juan José Santamaría Flecha
Date:
Subject: Re: can we add subscription TAP test option "vcregress subscriptioncheck" for MSVC builds?
Next
From: Alvaro Herrera
Date:
Subject: Re: Logical replication error "no record found" /* shouldn't happen */