Re: [BUG] pg_stat_statements and extended query protocol

From: "Imseih (AWS), Sami" <simseih(at)amazon(dot)com>
To: David Zhang <david(dot)zhang(at)highgo(dot)ca>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [BUG] pg_stat_statements and extended query protocol
Date: 2023-03-20 21:41:12
Message-ID: EC5F1919-6777-44D2-BB32-87DA503EF614@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sorry about the delay in response about this.

I was thinking about this and it seems to me we can avoid
adding new fields to Estate. I think a better place to track
rows and calls is in the Instrumentation struct.

--- a/src/include/executor/instrument.h
+++ b/src/include/executor/instrument.h
@@ -88,6 +88,8 @@ typedef struct Instrumentation
double nfiltered2; /* # of tuples removed by "other" quals */
BufferUsage bufusage; /* total buffer usage */
WalUsage walusage; /* total WAL usage */
+ int64 calls;
+ int64 rows_processed;
} Instrumentation;

If this is more palatable, I can prepare the patch.

Thanks for your feedback.

Regards.

Sami Imseih
Amazon Web Services (AWS)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jelte Fennema 2023-03-20 21:54:30 Re: [PATCH] Fix alter subscription concurrency errors
Previous Message Tomas Vondra 2023-03-20 20:48:58 Re: Add LZ4 compression in pg_dump