Log size in bytes of query result

From: Franklin Haut <franklin(dot)haut(at)gmail(dot)com>
To: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Log size in bytes of query result
Date: 2019-05-10 14:10:48
Message-ID: CAN1QLZ+xGmXY=Wh8-N7+rv733Et=Ro0QQJ5huFhi8pSii4BFuA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hello

How can we generate in the log of executed querys (directory pg_log) the
amount of bytes transferred between the server and the client of the result
of a query?

Example:

a) select now (); - few bytes transferred
b) select * from large_table; - 20,000,000 bytes transferred

I understand that this parameter can reduce the performance of the database
in general. I intend to use this information to measure the impact of each
query on the total volume of bytes transferred by the network interface by
IP address in a log analysis tool such as pgBadger

--
regards,

Franklin

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Laurenz Albe 2019-05-10 16:09:41 Re: Log size in bytes of query result
Previous Message Stephen Frost 2019-05-09 19:24:44 Re: integrate Postgres Users Authentication with our own LDAP Server