Re: [ADMIN] How to drop stats on table - Mailing list pgsql-general

From Sridhar N Bamandlapally
Subject Re: [ADMIN] How to drop stats on table
Date
Msg-id CAGuFTBXZr+Ab3Qnw9M-MZu=k8qh_p23UqhrnZW8vVYZmhC6bLw@mail.gmail.com
Whole thread Raw
In response to Re: [ADMIN] How to drop stats on table  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Responses Re: [ADMIN] How to drop stats on table
Re: [ADMIN] How to drop stats on table
Re: [ADMIN] How to drop stats on table
Re: [ADMIN] How to drop stats on table
List pgsql-general
the actual issue is, when 

1. temp table <say tmp1>is created with rows
2. stats/analyze on table (tmp1)
3. table dropped (tmp1)

but in stats related catalog tables a blot is created

In this scenario, thousands of temp tables created per day, blots are increasing and stats related tables are growing to 10's of GB

however, we schedule vacuum on catalog tables to control size

the worry is, catalog tables also undergo MVCC concept

I think when table is dropped, should have option to remove or reuse related blot-space on catalog tables

-Sridhar
 



On Fri, Nov 20, 2015 at 5:54 PM, Albe Laurenz <laurenz.albe@wien.gv.at> wrote:
Sridhar N Bamandlapally wrote:
> is there any feature available in postgres to drop stats on table?

What about

DELETE FROM pg_catalog.pg_statistic WHERE starelid = <table oid>

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: Jim Nasby
Date:
Subject: Re: postgres zeroization of dead tuples ? i.e scrubbing dead tuples with sensitive data.
Next
From: Adrian Klaver
Date:
Subject: Re: [ADMIN] How to drop stats on table