Re: PostgreSQL log query's result size

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Hellmuth Vargas <hivs77(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PostgreSQL log query's result size
Date: 2021-04-06 19:15:56
Message-ID: 20210406191556.GC6592@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 06, 2021 at 02:03:03PM -0500, Hellmuth Vargas wrote:
> Could you tell me if it is possible that as well as the configuration that
> the log presents the duration of the delayed queries, it can also present
> the size of the result data? especially those who want to return a lot of
> information

I think you can get what you want by with auto_explain.
https://www.postgresql.org/docs/current/auto-explain.html

You can set:
auto_explain.log_analyze

And then the "width" and "rows" are logged:
Result (cost=0.00..0.01 rows=1 width=4) (actual time=0.002..0.004 rows=1 loops=1)

PS, you should first ask on the pgsql-general list, rather than this
development list.

--
Justin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-04-06 20:01:44 Re: Stronger safeguard for archive recovery not to miss data
Previous Message Hellmuth Vargas 2021-04-06 19:03:03 PostgreSQL log query's result size