postgres-github.git / summary / log / commit / refs

commit    edee5634564d5f9fae4c3a10ee3182de338ed07e
Author:   Amit Langote <amitlan@postgresql.org>
Date:     Wed Apr 01 09:43:40 2026 +0000

    Make FastPathMeta self-contained by copying FmgrInfo structs
    
    FastPathMeta stored pointers into ri_compare_cache entries via
    compare_entries[], creating a dependency on that cache remaining
    stable.  If ri_compare_cache entries were invalidated after fpmeta
    was populated, the pointers would dangle.
    
    Replace compare_entries[] with inline copies of the two FmgrInfo
    fields actually needed (cast_func_finfo and eq_opr_finfo), copied
    at populate time via fmgr_info_copy().  fpmeta now depends only on
    riinfo remaining valid, which is already handled by the invalidation
    callback.
    
    Introduced by commit 2da86c1ef9 ("Add fast path for foreign key
    constraint checks"), noticed while reviewing code for robustness
    under CLOBBER_CACHE_ALWAYS.
    
    Discussion: https://postgr.es/m/CA+HiwqFQ+ZA7hSOygv4uv_t75B3r0_gosjadetCsAEoaZwTu6g@mail.gmail.com

[parent: e484b0eea614]