Re: [HACKERS] Skip all-visible pages during second HeapScan of CIC

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: [HACKERS] Skip all-visible pages during second HeapScan of CIC
Дата
Msg-id CAH2-Wz=utTUfrpyCX26WBN_Ru06EymUM2FggTyCdmvdNCjqJww@mail.gmail.com
обсуждение исходный текст
Ответ на [HACKERS] Skip all-visible pages during second HeapScan of CIC  (Pavan Deolasee <pavan.deolasee@gmail.com>)
Ответы Re: [HACKERS] Skip all-visible pages during second HeapScan of CIC  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Tue, Feb 28, 2017 at 5:42 AM, Pavan Deolasee
<pavan.deolasee@gmail.com> wrote:
> During the second heap scan of CREATE INDEX CONCURRENTLY, we're only
> interested in the tuples which were inserted after the first scan was
> started. All such tuples can only exists in pages which have their VM bit
> unset. So I propose the attached patch which consults VM during second scan
> and skip all-visible pages. We do the same trick of skipping pages only if
> certain threshold of pages can be skipped to ensure OS's read-ahead is not
> disturbed.

BTW, is there any danger of VACUUM acquiring a lock on the heap
relation (i.e. vacuuming it) after the first CIC transaction ends, but
before the second CIC transaction begins?

-- 
Peter Geoghegan



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: [HACKERS] Skip all-visible pages during second HeapScan of CIC
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] Skip all-visible pages during second HeapScan of CIC