pg_statistics bloat after drop table

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: pg_statistics bloat after drop table
Date: 2013-05-30 11:21:06
Message-ID: 20130530112106.GA28955@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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/

Browse pgsql-bugs by date

  From Date Subject
Next Message Hiroshi Inoue 2013-05-30 13:52:25 Re: Segmentation Fault in Postgres server when using psqlODBC
Previous Message vishnu.singh 2013-05-30 11:14:44 BUG #8190: Issue with slony-I replication on postgres master and slave database