Re: Hash Indexes

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>, Mithun Cy <mithun(dot)cy(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hash Indexes
Date: 2016-12-06 12:00:27
Message-ID: CAA4eK1Jbww43YwbpZj-4b42GyOugZj-O5iMmWP-B14+hgrLNfA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 6, 2016 at 1:29 PM, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:
>
>
> I just occasionally insert a bunch of equal tuples, which have to be in
> overflow pages no matter how much splitting happens.
>
> I am getting vacuum errors against HEAD, after about 20 minutes or so (8
> cores).
>
> 49233 XX002 2016-12-05 23:06:44.087 PST:ERROR: index "foo_index_idx"
> contains unexpected zero page at block 64941
> 49233 XX002 2016-12-05 23:06:44.087 PST:HINT: Please REINDEX it.
> 49233 XX002 2016-12-05 23:06:44.087 PST:CONTEXT: automatic vacuum of table
> "jjanes.public.foo"
>

Thanks for the report. This can happen due to vacuum trying to access
a new page. Vacuum can do so if (a) the calculation for maxbuckets
(in metapage) is wrong or (b) it is trying to free the overflow page
twice. Offhand, I don't see that can happen in code. I will
investigate further to see if there is any another reason why vacuum
can access the new page. BTW, have you done the test after commit
2f4193c3, that doesn't appear to be the cause of this problem, but
still, it is better to test after that fix. I am trying to reproduce
the issue, but in the meantime, if by anychance, you have a callstack,
then please share the same.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Asif Naeem 2016-12-06 12:31:35 Re: pgcrypto compilation error due to stack-allocated EVP_CIPHER_CTX
Previous Message Michael Paquier 2016-12-06 10:14:31 Re: Quorum commit for multiple synchronous replication.