Re: what specifically does vacuum have to scan / why does it need to rescan the same indexes many, many times

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: john gale <john(at)smadness(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: what specifically does vacuum have to scan / why does it need to rescan the same indexes many, many times
Date: 2014-07-02 00:57:12
Message-ID: CAMkU=1w-=Wqau8Z8V_t-byo4wv9mt=PoZUQ1ucD7PGg5UL6qzw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday, July 1, 2014, john gale <john(at)smadness(dot)com> wrote:

>
> What does vacuum have to scan to be able to reclaim space, and how many
> times does it need to scan to finalize ?
>
> More specifically, my VACUUM VERBOSE <table> is taking a long time and
> seems to be rescanning the same indexes / fields multiple times without
> finishing.
>

vacuum can only memorize one dead tuple for every 6 bytes of
maintenance_work_mem. If there are more dead tuples than that, it needs to
make multiple passes over the indexes.

Increase maintenance_work_mem to improve the efficiency.

Cheers,

Jeff

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Toby Corkindale 2014-07-02 01:10:27 Re: Two-way encryption
Previous Message john gale 2014-07-02 00:42:31 what specifically does vacuum have to scan / why does it need to rescan the same indexes many, many times