Add PQresultMemorySize function to report allocated size of a PGresult

Enterprise / PostgreSQL - Tom Lane [sss.pgh.pa.us] - 11 September 2018 22:45 EDT

This number can be useful for application memory management, and the overhead to track it seems pretty trivial.

Lars Kanis, reviewed by Pavel Stehule, some mods by me

Discussion: https://postgr.es/m/fa16a288-9685-14f2-97c8-b8ac84365a4f@greiz-reinsdorf.de

2970afa6cf Add PQresultMemorySize function to report allocated size of a PGresult.
doc/src/sgml/libpq.sgml | 34 ++++++++++++++++++++++++++++++++++
src/interfaces/libpq/exports.txt | 1 +
src/interfaces/libpq/fe-exec.c | 38 ++++++++++++++++++++++++++++++++------
src/interfaces/libpq/libpq-fe.h | 1 +
src/interfaces/libpq/libpq-int.h | 2 ++
5 files changed, 70 insertions(+), 6 deletions(-)

Upstream: git.postgresql.org


  • Share