ossc-db / pg_hint_plan

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

HintStateDelete should free all hint #81

Closed cstarc closed 2 years ago

cstarc commented 2 years ago

should free all hint, but not onlt scan hint.

    for (i = 0; i < hstate->num_hints[HINT_TYPE_SCAN_METHOD]; i++)
        hstate->all_hints[i]->delete_func(hstate->all_hints[i]);
horiguti commented 2 years ago

Year, that's right that the number of iterations is wrong. Fixed it at master. However, (almost) all of the memory chukcs allocated by pg_hint_plan are freed at the end of query by the core. So I don't it backpatch to older versions.

Thanks!