Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue 2046: Memory leak during btree(agtype) (#2060) #2072

Merged
merged 1 commit into from
Aug 23, 2024

Commits on Aug 22, 2024

  1. Fix issue 2046: Memory leak during btree(agtype) (apache#2060)

    Fixed the memory leaks during a btree index build.
    
    The issue has to do with how PostgreSQL allocates and frees its
    memory. Usually, contexts are destroyed, freeing up the memory in
    that context for the functions.  However, sometimes this destruction
    happens way too late for it to be helpful. In the case of btree
    compare, the context destruction doesn't happen until after the sort
    has completed. The solution is to add in pfrees to manage the memory
    we use, ourselves.
    
    Additionally, propagated these changes to a few other functions. More
    PRs will be created to address other locations where this applies.
    
    No regression tests were impacted.
    No additionall regression tests are needed.
    
    Resolved Conflicts:
    	src/backend/utils/adt/agtype.c
    jrgemignani committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    048faba View commit details
    Browse the repository at this point in the history