summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorDavid Rowley2024-09-12 04:02:01 +0000
committerDavid Rowley2024-09-12 04:02:01 +0000
commit9fba1ed2947382af213dfbfabfcd8898c89bf4ca (patch)
tree48636fbcd68879eb38b5e330e715e820c4936d7e /src/include
parente6c45d85dc168fb05b5ee5596a4de5167c9fe01f (diff)
Adjust tuplestore stats API
1eff8279d added an API to tuplestore.c to allow callers to obtain storage telemetry data. That API wasn't quite good enough for callers that perform tuplestore_clear() as the telemetry functions only accounted for the current state of the tuplestore, not the maximums before tuplestore_clear() was called. There's a pending patch that would like to add tuplestore telemetry output to EXPLAIN ANALYZE for WindowAgg. That node type uses tuplestore_clear() before moving to the next window partition and we want to show the maximum space used, not the space used for the final partition. Reviewed-by: Tatsuo Ishii, Ashutosh Bapat Discussion: https://postgres/m/CAApHDvoY8cibGcicLV0fNh=9JVx9PANcWvhkdjBnDCc9Quqytg@mail.gmail.com
Diffstat (limited to 'src/include')
-rw-r--r--src/include/utils/tuplestore.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/include/utils/tuplestore.h b/src/include/utils/tuplestore.h
index 3d8a90caaf9..e4782ac5a7f 100644
--- a/src/include/utils/tuplestore.h
+++ b/src/include/utils/tuplestore.h
@@ -65,9 +65,8 @@ extern void tuplestore_copy_read_pointer(Tuplestorestate *state,
extern void tuplestore_trim(Tuplestorestate *state);
-extern const char *tuplestore_storage_type_name(Tuplestorestate *state);
-
-extern int64 tuplestore_space_used(Tuplestorestate *state);
+extern void tuplestore_get_stats(Tuplestorestate *state, char **storage_type,
+ int64 *max_space);
extern bool tuplestore_in_memory(Tuplestorestate *state);