From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, "Ideriha, Takeshi" <ideriha(dot)takeshi(at)jp(dot)fujitsu(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com> |
Subject: | Re: GUC for cleanup indexes threshold. |
Date: | 2017-02-20 09:31:10 |
Message-ID: | CANP8+jLujSuHPZDntQbZigf5oESgjh49hTTc7bi5nDjAi264Sw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 20 February 2017 at 09:15, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> On Mon, Feb 20, 2017 at 7:26 AM, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>> On Fri, Feb 17, 2017 at 3:41 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>> On Thu, Feb 16, 2017 at 6:17 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>>>> On 15 February 2017 at 08:07, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>>>>> It's a bug. Attached latest version patch, which passed make check.
>>>> 2. The current btree vacuum code requires 2 vacuums to fully reuse
>>>> half-dead pages. So skipping an index vacuum might mean that second
>>>> index scan never happens at all, which would be bad.
>>>
>>> Maybe. If there are a tiny number of those half-dead pages in a huge
>>> index, it probably doesn't matter. Also, I don't think it would never
>>> happen, unless the table just never gets any more updates or deletes -
>>> but that case could also happen today. It's just a matter of
>>> happening less frequently.
>>
>
> Yeah thats right and I am not sure if it is worth to perform a
> complete pass to reclaim dead/deleted pages unless we know someway
> that there are many such pages.
Agreed.... which is why
On 16 February 2017 at 11:17, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> I suggest that we store the number of half-dead pages in the metapage
> after each VACUUM, so we can decide whether to skip the scan or not.
> Also, I think we do reclaim the
> complete page while allocating a new page in btree.
That's not how it works according to the README at least.
You might be referring to cleaning out killed tuples just before a
page split? That's something different.
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Joel Jacobson | 2017-02-20 09:36:46 | Re: case_preservation_and_insensitivity = on |
Previous Message | Joel Jacobson | 2017-02-20 09:30:22 | Re: case_preservation_and_insensitivity = on |