pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vik Fearing <vik.fearing@2ndquadrant.com>
To: Darafei "Komяpa" Praliaskouski <me@komzpa.net>
To: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Berserk Autovacuum (let's save next Mandrill)
Date: Sat, 30 Mar 2019 17:55:20 +0100
Message-ID: <271bc1a7-2b59-e3f3-56b7-c8bc5456424a@2ndquadrant.com> (raw)
In-Reply-To: <CAC8Q8t+j36G_bLF=+0iMo6jGNWnLnWb1tujXuJr-+x8ZCCTqoQ@mail.gmail.com>
References: <CAC8Q8t+j36G_bLF=+0iMo6jGNWnLnWb1tujXuJr-+x8ZCCTqoQ@mail.gmail.com>

On 27/03/2019 21:54, Darafei "Komяpa" Praliaskouski wrote:
> Hi hackers,
> 
> Attached is sketch of small patch that fixes several edge cases with
> autovacuum. Long story short autovacuum never comes to append only
> tables, killing large productions.
> 
> First case, mine.
>  https://www.postgresql.org/message-id/CAC8Q8tLBeAxR%2BBXWuKK%2BHP5m8tEVYn270CVrDvKXt%3D0PkJTY9g%40ma...
> 
> We had a table we were appending and wanted Index Only Scan to work. For
> it to work, you need to call VACUUM manually, since VACUUM is the only
> way to mark pages all visible, and autovacuum never comes to append only
> tables. We were clever to invent a workflow without dead tuples and it
> painfully bit us.
> 
> Second case, just read in the news.
> https://mailchimp.com/what-we-learned-from-the-recent-mandrill-outage/
> 
> Mandrill has 6TB append only table that autovacuum probably never
> vacuumed. Then anti-wraparound came and production went down. If
> autovacuum did its job before that last moment, it would probably be okay.
> 
> Idea: look not on dead tuples, but on changes, just like ANALYZE does.
> It's my first patch on Postgres, it's probably all wrong but I hope it
> helps you get the idea.

This was suggested and rejected years ago:
https://www.postgresql.org/message-id/b970f20f-f096-2d3a-6c6d-ee887bd30cfb@2ndquadrant.fr
-- 
Vik Fearing                                          +33 6 46 75 15 36
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support





view thread (158+ messages)  latest in thread

Message-ID: <271bc1a7-2b59-e3f3-56b7-c8bc5456424a@2ndquadrant.com>
Permalink:  ../271bc1a7-2b59-e3f3-56b7-c8bc5456424a@2ndquadrant.com/
Also on:    postgresql.org/message-id/271bc1a7-2b59-e3f3-56b7-c8bc5456424a@2ndquadrant.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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: vik.fearing@2ndquadrant.com, me@komzpa.net, pgsql-hackers@lists.postgresql.org
  Subject: Re: Berserk Autovacuum (let's save next Mandrill)
  In-Reply-To: <271bc1a7-2b59-e3f3-56b7-c8bc5456424a@2ndquadrant.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