From: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
---|---|
To: | Peter Geoghegan <pg(at)bowt(dot)ie> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Improve search for missing parent downlinks in amcheck |
Date: | 2019-08-12 19:00:49 |
Message-ID: | CAPpHfdub0qSm7MPr7=9yrOLm0gtcShLFmJke-f26HX51z-oh-w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jul 19, 2019 at 3:21 AM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> On Tue, Apr 30, 2019 at 5:58 PM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> > I will think about a simple fix, but after the upcoming point release.
> > There is no hurry.
>
> Attached draft patch uses RelationGetNumberOfBlocks() to size each of
> the two Bloom filters that may be used by amcheck to perform
> verification.
>
> The basic heapallindexed Bloom filter is now sized based on the
> conservative assumption that there must be *at least*
> "RelationGetNumberOfBlocks() * 50" elements to fingerprint (reltuples
> will continue to be used to size the basic heapallindexed Bloom filter
> in most cases, though). The patch also uses the same
> RelationGetNumberOfBlocks() value to size the downlink Bloom filter.
> This second change will fix your problem very non-invasively.
>
> I intend to backpatch this to v11 in the next few days.
Thank you for backpatching this!
BTW, there is next revision of patch I'm proposing for v13.
In this revision check for missing downlinks is combined with
bt_downlink_check(). So, pages visited by bt_downlink_check() patch
doesn't cause extra accessed. It only causes following additional
page accesses:
1) Downlinks corresponding to "negative infinity" keys,
2) Pages of child level, which are not referenced by downlinks.
But I think these two kinds are very minority, and those accesses
could be trade off with more precise missing downlink check without
bloom filter. What do you think?
------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attachment | Content-Type | Size |
---|---|---|
amcheck-btree-improve-missing-parent-downlinks-check-2.patch | application/octet-stream | 14.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2019-08-12 19:07:49 | Re: SegFault on 9.6.14 |
Previous Message | Tom Lane | 2019-08-12 18:17:19 | Re: clean up obsolete initdb locale handling |