Re: Table not cleaning up drom dead tuples

From: Антон Тарабрин <tarabanton(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Table not cleaning up drom dead tuples
Date: 2017-03-14 14:05:20
Message-ID: CAJH0_XvnVj66bSfALMm3Cmk64b9s9fWGMpks=aKAHin-LHdPBA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Yep. VACUUM FULL not helping us on OLD table, that are not getting updated
and not used in any requests. Bloat is still there
This is production system, so now we are investigating why it's happening.

> Information about problematic tables:
> https://gist.github.com/tarabanton/edf7f8dc26eb7ec37a9cfa3424493871
At the link above is some results of VACUUM (ANALYZE, VERBOSE) from source
(OLD) table.

вт, 14 мар. 2017 г. в 16:53, Glyn Astill <glynastill(at)yahoo(dot)co(dot)uk>:

> > We are temporarily fixing this like that:
> > BEGIN;
> > CREATE TABLE _orders_temp (LIKE orders_y2017_m3 INCLUDING DEFAULTS
> INCLUDING CONSTRAINTS INCLUDING INDEXES INCLUDING COMMENTS);
> > INSERT INTO _orders_temp select * from orders_y2017_m3;
> > ALTER TABLE orders_y2017_m3 RENAME TO __orders_y2017_m3_to_drop;
> > ALTER TABLE __orders_y2017_m3_to_drop NO INHERIT orders;
> > ALTER TABLE _orders_temp RENAME TO orders_y2017_m3;
> > ALTER TABLE orders_y2017_m3 INHERIT orders;
> > COMMIT;
> >
> > but bloat returns again and again
>
> Some bloat is to be expected unless you've totally static data due to the
> postgres MVCC model.
>
> Are you saying vacuum full and cluster aren't removing the bloat? Sounds
> unlikely to me.
>
>
> Issues only arise when you can't manage it; from what you've posted we can
> see autovacuum is running, but perhaps it's not keeping up with your
> workload, or your update patterns make it difficult to keep bloat down; we
> can see some rollbacks which I'm sure are part of your problem.
>
> You could try updating to the latest minor version of postgres as there
> are a few fixes to autovacuum in versions after 9.5.3, but I think
> analyzing your update patterns and/or tuning autovacuum will be your
> starting point.
>
--
___________________________
С наилучшими пожеланиями,
Антон Тарабрин

With best regards,
Anton Tarabrin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2017-03-14 14:10:58 Re: UPDATE ... ON CONFLICT DO NOTHING
Previous Message Alexander Farber 2017-03-14 13:53:40 Re: UPDATE ... ON CONFLICT DO NOTHING