• Tom Lane's avatar
    Remove the pgstat_drop_relation() call from smgr_internal_unlink(), because · b09cb0cf
    Tom Lane authored
    we don't know at that point which relation OID to tell pgstat to forget.
    The code was passing the relfilenode, which is incorrect, and could possibly
    cause some other relation's stats to be zeroed out.  While we could try to
    clean this up, it seems much simpler and more reliable to let the next
    invocation of pgstat_vacuum_tabstat() fix things; which indeed is how it
    worked before I introduced the buggy code into 8.1.3 and later :-(.
    Problem noticed by Itagaki Takahiro, fix is per subsequent discussion.
    b09cb0cf
pgstat.c 79.3 KB