RE: [PATCH] pg_stat_toast v0.3

From: "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: "'Gunnar \"Nick\" Bluth'" <gunnar(dot)bluth(at)pro-open(dot)de>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: RE: [PATCH] pg_stat_toast v0.3
Date: 2021-12-21 12:51:21
Message-ID: TYAPR01MB586652F17BDED3752636103CF57C9@TYAPR01MB5866.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear Gunnar,

> The attached v0.3 includes
> * columns "storagemethod" and "compressmethod" added as per Hayato
> Kuroda's suggestion

I prefer your implementation that referring another system view.

> * gathering timing information

Here is a minor comment:
I'm not sure when we should start to measure time.
If you want to record time spent for compressing, toast_compress_datum() should be
sandwiched by INSTR_TIME_SET_CURRENT() and caclurate the time duration.
Currently time_spent is calcurated in the pgstat_report_toast_activity(),
but this have a systematic error.
If you want to record time spent for inserting/updating, however,
I think we should start measuring at the upper layer, maybe heap_toast_insert_or_update().

> Any hints on how to write meaningful tests would be much appreciated!
> I.e., will a test

I searched hints from PG sources, and I thought that modules/ subdirectory can be used.
Following is the example:
https://github.com/postgres/postgres/tree/master/src/test/modules/commit_ts

I attached a patch to create a new test. Could you rewrite the sql and the output file?

Best Regards,
Hayato Kuroda
FUJITSU LIMITED

Attachment Content-Type Size
adding_new_test.patch application/octet-stream 2.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2021-12-21 12:59:42 Re: Multi-Column List Partitioning
Previous Message Pavel Stehule 2021-12-21 12:39:45 Re: Schema variables - new implementation for Postgres 15