Re: [PATCHES] GIN improvements
От | Tom Lane |
---|---|
Тема | Re: [PATCHES] GIN improvements |
Дата | |
Msg-id | 8177.1216920042@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [PATCHES] GIN improvements (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [PATCHES] GIN improvements
|
Список | pgsql-hackers |
I wrote: > Really? Then GiST needs to be fixed too. Otherwise you risk having > queries return the same row twice. A bitmap indexscan plan would mask > such an index bug ... but a plain indexscan won't. BTW, there's another issue I forgot about yesterday, which is that the planner assumes that all index AMs work correctly for backwards scan. The place where the rubber meets the road here is that if you DECLARE SCROLL CURSOR for a plan implemented as a plain indexscan, then FETCH BACKWARDS is supposed to reliably generate results consistent with previous FETCH FORWARDS, to wit the same tuples in the reverse order. We can assume that the query is using an MVCC snapshot, which means that at the index level it's okay for the index to return newly-inserted entries that weren't returned in the previous forward scan, or to not return entries that were removed meanwhile by VACUUM. But re-ordering live tuples is bad news. The idea of copying the pending-tuples list into local scan state would make this work as expected as far as the proposed patch goes, but I'm wondering whether the behavior isn't completely broken anyway by operations such as page splits. Do we need to change the planner to assume that this only works nicely for btree? regards, tom lane
В списке pgsql-hackers по дате отправления: