Re: Reindex doesn't eliminate bloat

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Reindex doesn't eliminate bloat
Date: 2018-03-12 23:00:29
Message-ID: f0817306-f3ef-d455-2c78-fc945f1fd764@cox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 03/12/2018 05:55 PM, Adrian Klaver wrote:
> On 03/12/2018 03:05 PM, Ron Johnson wrote:
>> v8.4.12
>>
>> According to this (https://pastebin.com/TJB32n5M) query, which I thought
>> I got from https://wiki.postgresql.org/wiki/Index_Maintenance, a list of
>> indexes and their bloat is generated.
>>
>> After reindexing a table with a large amount of reported bloat (column
>> bloat_pct says 29%), re-running the query shows no change in the amount
>
> First I am not seeing a column bloat_pct in the query you linked to, so
> are you sure that is the actual query you used?

Sorry.  bloat_pct is renamed bloat_ratio.

>
>> of bloat.  This is a historical table, and VACUUM VERBOSE shows that
>> there's nothing to free up.
>>
>> Is this something that I must live with, or am I misinterpreting the query?
>
> Honestly I have not worked my way in depth through the query you show,
> though I did notice it uses pg_stats. What happens if run ANALYZE
> (https://www.postgresql.org/docs/8.4/static/sql-analyze.html) to update
> the stats?

I did ANALYZE VERBOSE on the underlying table.  No change.

--
Angular momentum makes the world go 'round.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Kretschmer 2018-03-12 23:58:27 Re: Logical decoding on standby
Previous Message Adrian Klaver 2018-03-12 22:55:39 Re: Reindex doesn't eliminate bloat