BRIN indexes (was Re: Minmax indexes)
От | Alvaro Herrera |
---|---|
Тема | BRIN indexes (was Re: Minmax indexes) |
Дата | |
Msg-id | 20140908160219.GN14037@eldon.alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: Minmax indexes (Heikki Linnakangas <hlinnakangas@vmware.com>) |
Ответы |
Re: BRIN indexes - TRAP: BadArgument
Re: BRIN indexes (was Re: Minmax indexes) Re: BRIN indexes (was Re: Minmax indexes) |
Список | pgsql-hackers |
Here's version 18. I have renamed it: These are now BRIN indexes. I have fixed numerous race conditions and deadlocks. In particular I fixed this problem you noted: Heikki Linnakangas wrote: > Another race condition: > > If a new tuple is inserted to the range while summarization runs, > it's possible that the new tuple isn't included in the tuple that > the summarization calculated, nor does the insertion itself udpate > it. I did it mostly in the way you outlined, i.e. by way of a placeholder tuple that gets updated by concurrent inserters and then the tuple resulting from the scan is unioned with the values in the updated placeholder tuple. This required the introduction of one extra support proc for opclasses (pretty simple stuff anyhow). There should be only minor items left now, such as silencing the WARNING: concurrent insert in progress within table "sales" which is emitted by IndexBuildHeapScan (possibly thousands of times) when doing a summarization of a range being inserted into or otherwise modified. Basically the issue here is that IBHS assumes it's being run with ShareLock in the heap (which blocks inserts), but here we're using it with ShareUpdateExclusive only, which lets inserts in. There is no harm AFAICS because of the placeholder tuple stuff I describe above. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Вложения
В списке pgsql-hackers по дате отправления: