PG-2424 PostgreSQL 19 support - #806
Conversation
19a2402 to
fed60d2
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #806 +/- ##
==========================================
- Coverage 88.57% 88.08% -0.49%
==========================================
Files 3 3
Lines 1304 1318 +14
Branches 180 183 +3
==========================================
+ Hits 1155 1161 +6
- Misses 75 80 +5
- Partials 74 77 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
fed60d2 to
481ccb5
Compare
0c199bc to
2a116fe
Compare
jeltz
left a comment
There was a problem hiding this comment.
I have not reviewed what actually changed in PGSS.
| name: Build | ||
| runs-on: ${{ inputs.os }} | ||
| timeout-minutes: 10 | ||
| timeout-minutes: 15 |
There was a problem hiding this comment.
Why was this change necessary?
There was a problem hiding this comment.
Also is this really the right commit?
There was a problem hiding this comment.
Tests run for PG19 takes slightly more time. It was added to this commit to make it atomic, so CI will pass together with PG19 related changes.
There was a problem hiding this comment.
Ah, so then it is just in the wrong commit.
There was a problem hiding this comment.
So you want this to be separate commit anyway?
|
Do we need to support |
958ddb5 to
fed3a0b
Compare
Added |
|
what are the concerns regarding changes in PGSS that are being referenced here? |
|
@adeshthack The main thing was |
|
|
||
| - Our name and version are now in `pg_get_loaded_modules()` for PostgreSQL 18+ | ||
| - Support for `EXEC_BACKEND` builds ([PG-2547](https://perconadev.atlassian.net/browse/PG-2547)) | ||
| - Add PostgreSQL 19 support ([PG-2424](https://perconadev.atlassian.net/browse/PG-2424)) |
There was a problem hiding this comment.
Maybe mention the two new fields?
There was a problem hiding this comment.
Property graph support should maybe also be mentioned.
| if (rte->relkind == RELKIND_VIEW) | ||
| if (rte->relkind == RELKIND_VIEW | ||
| #if PG_VERSION_NUM >= 190000 | ||
| || rte->relkind == RELKIND_PROPGRAPH |
There was a problem hiding this comment.
Us even getting here show that the concidional a bit up has a typo in it. We should fix that conditional.
if (rte->rtekind != RTE_RELATION
#if PG_VERSION_NUM >= 160000
&& rte->rtekind != RTE_SUBQUERY && rte->relkind != RELKIND_VIEW
#endif
)
Has a typo in it. It should have been something like && !(rte->rtekind == RTE_SUBQUERY && rte->relkind == RELKIND_VIEW).
There was a problem hiding this comment.
Actually maybe it is even unnecessary since it cannot be true given the assertion in the PostgreSQL code, right? Maybe we should fcheck for perminfoindex or similar? But either way we should clean up the above.
/*
* Only relation RTEs and subquery RTEs that were once relation
* RTEs (views, property graphs) have their perminfoindex set.
*/
Assert(rte->rtekind == RTE_RELATION ||
(rte->rtekind == RTE_SUBQUERY &&
(rte->relkind == RELKIND_VIEW || rte->relkind == RELKIND_PROPGRAPH)));
There was a problem hiding this comment.
perminfoindex fits perfectly here 👍
Make pg_stat_monitor compilable against PostgreSQL 19 PostgreSQL 19 optimized SELECT ... INTO statements execution(ce8d5fe), so some of them are no longer tracked by pg_stat_statements/pg_stat_monitor. So we update level tracking test to address this change. Build and test CI workflow required timeout increase as PG 19 requires slightly more time.
There are no PostgreSQL 19 packages yet, so add this version only to source based workflows.
pg_stat_statements introduces two new coutners in PostgreSQL 19: - generic_plan_calls - custom_plan_calls These counters track how many times a prepared statement was executed using a generic or custom plan. Backport them to pg_stat_monitor.
PostgreSQL 19 exposes ComputeConstantLengths function, so there is no more reasons to compute constant lenght with our own implemenation.
In PostgreSQL 19 some pg_stat_statements tests got updates. Backport them to pg_stat_monitor.
Backport the upstream pg_stat_statements fix (commit b1635c16669) from PostgreSQL 18. Mark same-location duplicates with length = -1 before the squashed check.
Mark property graphs with * the same way as we do for views.
Condition had and issue where it was keeping all subqueries, but it should keep only subqueries that are views or property graphs. Rewrite it with better condition: perminfoindex is non-zero for all types of RTEs that we need.
fed3a0b to
96a3336
Compare
yea sounds good |
PG-2424
Description
https://www.postgresql.org/docs/19/release-19.html#RELEASE-19-PGSTATSTATEMENTS
postgres/postgres@REL_18_4...REL_19_BETA2
Links
Fixes #773