ossc-db / pg_hint_plan

Extension adding support for optimizer hints in PostgreSQL
Other
715 stars 103 forks source link

Backport merge from PG14. Fix for floating segfault issue #97

Closed WinterUnicorn closed 1 year ago

WinterUnicorn commented 2 years ago

We have an issues with segfault on pg_hint_plan for PG13. We don't have stable case to reproduce theses issues (issue is floating) but it is critical for us because database segfault issue occurs at any time. The most suspicious are cases with '?' symbols when working with hint tables, invalid access to the deleted current_hint_str and hint delete functions.
After we applied these fixes (we merge it from the master branch) we don't see these issues anymore.

michaelpq commented 1 year ago

I am not sure if there is anything remaining here, so if you see additional issues, please feel free to add more details, like a backtrace with a self-contained test case. For now, I have applied and backpatched all the parts that looked relevant.