summaryrefslogtreecommitdiff
path: root/src/test/modules/commit_ts
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2026-01-16 08:13:30 +0900
committerMichael Paquier <michael@paquier.xyz>2026-01-16 08:13:30 +0900
commitd756fa1019ff6131944ab263a93a14c4e3b68c39 (patch)
tree5ba3a2fa6b30b36e111eb945d04898d8a56f4280 /src/test/modules/commit_ts
parentd40fd85187d06f7bd16fb4d0067bad0b1d248718 (diff)
Add pg_clear_extended_stats()HEADorigin/masterorigin/HEADmaster
This function is able to clear the data associated to an extended statistics object, making things so as the object looks as newly-created. The caller of this function needs the following arguments for the extended stats to clear: - The name of the relation. - The schema name of the relation. - The name of the extended stats object. - The schema name of the extended stats object. - If the stats are inherited or not. The first two parameters are especially important to ensure a consistent lookup and ACL checks for the relation on which is based the extended stats object that will be cleared, relying first on a RangeVar lookup where permissions are checked without locking a relation, critical to prevent denial-of-service attacks when using this kind of function (see also 688dc6299a5b for a similar concern). The third to fifth arguments give a way to target the extended stats records to clear. This has been extracted from a larger patch by the same author, for a piece which is again useful on its own. I have rewritten large portions of it. The tests have been extended while discussing this piece, resulting on what this commit includes. The intention behind this feature is to add support for the import of extended statistics across dumps and upgrades, this change building one piece that we will be able to rely on for the rest of the changes. Bump catalog version. Author: Corey Huinker <corey.huinker@gmail.com> Co-authored-by: Michael Paquier <michael@paquier.xyz> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Discussion: https://postgr.es/m/CADkLM=dpz3KFnqP-dgJ-zvRvtjsa8UZv8wDAQdqho=qN3kX0Zg@mail.gmail.com
Diffstat (limited to 'src/test/modules/commit_ts')
0 files changed, 0 insertions, 0 deletions