pgsql: Remove the pgstat_drop_relation() call from

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Remove the pgstat_drop_relation() call from
Date: 2007-07-08 22:23:32
Message-ID: [email protected]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Tags:
----
REL8_1_STABLE

Modified Files:
--------------
pgsql/src/backend/postmaster:
pgstat.c (r1.111.2.8 -> r1.111.2.9)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/pgstat.c.diff?r1=1.111.2.8&r2=1.111.2.9)
pgsql/src/backend/storage/smgr:
smgr.c (r1.93.2.3 -> r1.93.2.4)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/smgr/smgr.c.diff?r1=1.93.2.3&r2=1.93.2.4)
pgsql/src/include:
pgstat.h (r1.38.2.1 -> r1.38.2.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/pgstat.h.diff?r1=1.38.2.1&r2=1.38.2.2)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2007-07-09 01:08:09 pgsql: Minor copy-editing.
Previous Message Tom Lane 2007-07-08 22:23:25 pgsql: Remove the pgstat_drop_relation() call from