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

commit    524cc0f638745489f55bafa12f3f93fe8944e027
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Mon May 25 22:15:49 2026 +0000

    Fix missed ReleaseVariableStats() in intarray's _int_matchsel().
    
    Given a WHERE clause like "int[] @@ query_int" or "query_int ~~ int[]"
    where the query_int side is a table column having statistics,
    _int_matchsel() exited without remembering to free the statistics
    tuple.  This would typically lead to warnings about cache refcount
    leakage, like
      WARNING:  resource was not closed: cache pg_statistic (73), tuple 42/12 has count 1
    It's been wrong since this code was added, in commit c6fbe6d6f.
    
    Bug: #19492
    Reported-by: Man Zeng <zengman@halodbtech.com>
    Author: Man Zeng <zengman@halodbtech.com>
    Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
    Discussion: https://postgr.es/m/19492-ddcd0e22399ef85a@postgresql.org
    Backpatch-through: 14