Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ui0uz-0004m0-NQ for pgsql-bugs@arkaria.postgresql.org; Thu, 30 May 2013 11:21:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Ui0uy-0000e1-Np for pgsql-bugs@arkaria.postgresql.org; Thu, 30 May 2013 11:21:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ui0ux-0000dv-RA for pgsql-bugs@postgresql.org; Thu, 30 May 2013 11:21:15 +0000 Received: from andy.depesz.com ([88.198.47.100] helo=depesz.com) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ui0uq-0004e8-Dt for pgsql-bugs@postgresql.org; Thu, 30 May 2013 11:21:15 +0000 Received: from andy.depesz.com ([88.198.47.100] helo=depesz.com) by depesz.com with esmtpa (Exim 4.80) (envelope-from ) id 1Ui0uo-0008Fr-GA for pgsql-bugs@postgresql.org; Thu, 30 May 2013 13:21:06 +0200 Date: Thu, 30 May 2013 13:21:06 +0200 From: hubert depesz lubaczewski To: pgsql-bugs@postgresql.org Subject: pg_statistics bloat after drop table Message-ID: <20130530112106.GA28955@depesz.com> Reply-To: depesz@depesz.com MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -3.0 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Tested on todays HEAD of 9.3. Steps to reproduce: $ create table t1 (i int4); CREATE TABLE $ insert into t1 (i) values (1); INSERT 0 1 $ analyze t1; ANALYZE $ select count(*) from pg_statistic where starelid = 't1'::regclass; count ------- 1 (1 row) $ create table t2 () inherits (t1); CREATE TABLE $ analyze t1; ANALYZE $ select count(*) from pg_statistic where starelid = 't1'::regclass; count ------- 2 (1 row) $ drop table t2; DROP TABLE $ analyze t1; ANALYZE $ select count(*) from pg_statistic where starelid = 't1'::regclass; count ------- 2 (1 row) I think that the additional row (with stainherit = true) should be deleted. Best regards, depesz -- The best thing about modern society is how easy it is to avoid contact with it. http://depesz.com/ -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs