pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@depesz.com>
To: pgsql-bugs@postgresql.org
Subject: pg_statistics bloat after drop table
Date: Thu, 30 May 2013 13:21:06 +0200
Message-ID: <20130530112106.GA28955@depesz.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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/


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



Message-ID: <20130530112106.GA28955@depesz.com>
Permalink:  ../20130530112106.GA28955@depesz.com/
Also on:    postgresql.org/message-id/20130530112106.GA28955@depesz.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: depesz@depesz.com
  Subject: Re: pg_statistics bloat after drop table
  In-Reply-To: <20130530112106.GA28955@depesz.com>
  References: <20130530112106.GA28955@depesz.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox