Re: [HACKERS] Index corruption with CREATE INDEX CONCURRENTLY
От | Pavan Deolasee |
---|---|
Тема | Re: [HACKERS] Index corruption with CREATE INDEX CONCURRENTLY |
Дата | |
Msg-id | CABOikdPVi=DxSmaVJz8j+gBMpQ9A+6ka_DgbRYnNnAwaFt01xw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Index corruption with CREATE INDEX CONCURRENTLY (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: [HACKERS] Index corruption with CREATE INDEX CONCURRENTLY
|
Список | pgsql-hackers |
On Sun, Feb 19, 2017 at 3:43 PM, Robert Haas <robertmhaas@gmail.com> wrote:
On Fri, Feb 17, 2017 at 11:15 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Ah, nah, scratch that. If any post-index-build pruning had occurred on a
> page, the evidence would be gone --- the non-matching older tuples would
> be removed and what remained would look consistent. But it wouldn't
> match the index. You might be able to find problems if you were willing
> to do the expensive check on *every* HOT chain, but that seems none too
> practical.
If the goal is just to detect tuples that aren't indexed and should
be, what about scanning each index and building a TIDBitmap of all of
the index entries, and then scanning the heap for non-HOT tuples and
probing the TIDBitmap for each one? If you find a heap entry for
which you didn't find an index entry, go and recheck the index and see
if one got added concurrently. If not, whine.
Thanks,
Pavan
--
Pavan Deolasee http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: