Re: [BUG] pg_stat_statements and extended query protocol - Mailing list pgsql-hackers

From Imseih (AWS), Sami
Subject Re: [BUG] pg_stat_statements and extended query protocol
Date
Msg-id CA16F613-DB47-406B-B2DE-66D9FA9BE7FD@amazon.com
Whole thread Raw
In response to Re: [BUG] pg_stat_statements and extended query protocol  (Michael Paquier <michael@paquier.xyz>)
Responses Re: [BUG] pg_stat_statements and extended query protocol  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
> Doing nothing for calls now is fine by me, though I
> agree that this could be improved at some point, as seeing only 1
> rather than N for each fetch depending on the size is a bit confusing.

I think we will need to clearly define what "calls" is. Perhaps as mentioned
above, we may need separate counters for "calls" vs "fetches". This is
definitely a separate thread.


> Doesn't this comment at the top of ExecutorRun() need an update? It
> seems to me that this comment should mention both es_total_processed

Yes, updated in v5.


> There is no need for this part in ExecutorFinish(), actually, as long
> as we always increment es_total_processed at the end ExecutorRun() for
> all the operation types? 

Ah, correct. I changed that and tested again.

> - es_processed: number of tuples processed during one ExecutorRun()
> call.
> - es_total_processed: total number of tuples aggregated across all
> ExecutorRun() calls.

I thought hard about this point and for some reason I did not want to
mention ExecutorRun in the comment. But, I agree with what you suggest.
It's more clear as to the intention of the fields.

Attached is v5 addressing the comments.


Regards,

Sami Imseih
Amazon Web Services (AWS)


Attachment

pgsql-hackers by date:

Previous
From: Alexander Lakhin
Date:
Subject: Re: [PATCH] reduce page overlap of GiST indexes built using sorted method
Next
From: Peter Geoghegan
Date:
Subject: Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode