]> granicus.if.org Git - postgresql/commit
Remove the pgstat_drop_relation() call from smgr_internal_unlink(), because
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 8 Jul 2007 22:23:25 +0000 (22:23 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 8 Jul 2007 22:23:25 +0000 (22:23 +0000)
commit18e47a572c59ac5843b8b7031ce13bd03aae6e29
tree3b6e5cf39399ee8f707d84207178517b602d67a5
parent2f2c67f574a38936dfa98dd65e689ec6485861f5
Remove the pgstat_drop_relation() call from smgr_internal_unlink(), because
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.
src/backend/postmaster/pgstat.c
src/backend/storage/smgr/smgr.c
src/include/pgstat.h