From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Imseih (AWS), Sami" <simseih(at)amazon(dot)com> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>, David Zhang <david(dot)zhang(at)highgo(dot)ca>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [BUG] pg_stat_statements and extended query protocol |
Date: | 2023-04-04 02:47:11 |
Message-ID: | 1308756.1680576431@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Imseih (AWS), Sami" <simseih(at)amazon(dot)com> writes:
>> Also, I'm doubtful that counting calls this way is a great idea,
>> which would mean you only need one new counter field not two. The
>> fact that you're having trouble defining what it means certainly
>> suggests that the implementation is out front of the design.
> ISTM you are not in agreement that a call count should be incremented
> after every executorRun, but should only be incremented after
> the portal is closed, at executorEnd. Is that correct?
Right. That makes the "call count" equal to the number of times the
query is invoked.
> FWIW, The rationale for incrementing calls in executorRun is that calls refers
> to the number of times a client executes a portal, whether partially or to completion.
Why should that be the definition? Partial execution of a portal
might be something that is happening at the driver level, behind the
user's back. You can't make rational calculations of, say, plan
time versus execution time if that's how "calls" is measured.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | tender wang | 2023-04-04 02:53:32 | same query but different result on pg16devel and pg15.2 |
Previous Message | Imseih (AWS), Sami | 2023-04-04 02:19:46 | Re: [BUG] pg_stat_statements and extended query protocol |