Re: [PATCH] pg_stat_toast

From: "Gunnar \"Nick\" Bluth" <gunnar(dot)bluth(at)pro-open(dot)de>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>
Subject: Re: [PATCH] pg_stat_toast
Date: 2022-04-07 07:43:22
Message-ID: ffca1481-72e7-f88b-cc3f-0969d61e21bf@pro-open.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Am 06.04.22 um 17:49 schrieb Alvaro Herrera:
> On 2022-Apr-06, Robert Haas wrote:
>
>> Now if we're only incurring that overhead when this feature is
>> enabled, then in fairness that problem is a lot less of an issue,
>> especially if this is also disabled by default. People who want the
>> data can get it and pay the cost, and others aren't much impacted.
>> However, experience has taught me that a lot of skepticism is
>> warranted when it comes to claims about how cheap extensions to the
>> statistics system will be.
>
> Maybe this feature should provide a way to be enabled for tables
> individually, so you pay the overhead only where you need it and don't
> swamp the system with stats for uninteresting tables.
>
That would obviously be very nice (and Georgios pushed heavily in that
direction ;-).

However, I intentionally bound those stats to the database level (see my
very first mail).

The changes to get them bound to attributes (or tables) would have
required mangling with quite a lot of very elemental stuff, (e.g.
attribute stats only get refreshed by ANALYZE and their structure would
have to be changed significantly, bloating them even if the feature is
inactive).

It also would have made the stats updates synchronous (at TX end), would
have been "blind" for all TOAST efforts done by rolled back TXs etc.

What you can do is of course (just like track_functions):
ALTER DATABASE under_surveillance SET track_toast = [on|off];

Best,
--
Gunnar "Nick" Bluth

Eimermacherweg 106
D-48159 Münster

Mobil +49 172 8853339
Email: gunnar(dot)bluth(at)pro-open(dot)de
__________________________________________________________________________
"Ceterum censeo SystemD esse delendam" - Cato

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2022-04-07 07:44:20 pgsql: Prefetch data referenced by the WAL, take II.
Previous Message Andres Freund 2022-04-07 07:37:29 Re: Skip partition tuple routing with constant partition key