pg_statistics bloat after drop table - Mailing list pgsql-bugs

From hubert depesz lubaczewski
Subject pg_statistics bloat after drop table
Date
Msg-id 20130530112106.GA28955@depesz.com
Whole thread Raw
List 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/

pgsql-bugs by date:

Previous
From: Khamphousone Bounkong
Date:
Subject: Re: BUG #8183: field timestamp result to date
Next
From: vishnu.singh@sunarctechnologies.com
Date:
Subject: BUG #8190: Issue with slony-I replication on postgres master and slave database