Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several enhancements to support PostgreSQL 17 in pg_statsinfo.
The key changes include:
Improved Backend Identification: Replaced MyBackendId with MyProcNumber for more accurate backend identification in PostgreSQL 17.
Removal of Obsolete Field: Removed the tuplestore_donestoring field, which is no longer relevant in PostgreSQL 17.
Refined Background Writer Metrics: Removed the buffers_backend and buffers_backend_fsync fields from pg_stat_bgwriter to reflect changes in PostgreSQL 17's background writer.
Updated Shared Block I/O Metrics: Renamed the blk_{read|write}time columns in pg_stat_statements to shared_blk{read|write}_time to align with the updated metrics in PostgreSQL 17.
Adjusted Default Value: Changed the default value of the attstattarget column in pg_attribute from -1 to NULL to match the PostgreSQL 17 behavior.
Enhanced Testing: Added test cases to ensure compatibility with the pg_maintain role.
This update ensures full compatibility with PostgreSQL 17 and improves the accuracy and relevance of the collected statistics. All changes have been thoroughly tested.
Please review the changes and let me know if you have any questions or concerns. Thank you!