Re: AW: AW: Adding index flag showing tuple status
| От | Bruce Momjian |
|---|---|
| Тема | Re: AW: AW: Adding index flag showing tuple status |
| Дата | |
| Msg-id | 200105181608.f4IG8Uo28993@candle.pha.pa.us обсуждение исходный текст |
| Список | pgsql-hackers |
> > I wasn't going to delete it, just add a flag to index scans know they > > don't need to look at the heap table. > > If it is only a flag, you would need to go to the same trouble > that vacuum already goes to (you cannot mark it if someone else > is still interested in this snapshot). Thus I do not see any > benefit in adding a flag, versus deleting not needed keys. To > avoid the snapshot trouble you would need a xid (xmax or > something), and that is 4 bytes, and not a simple flag. Yes, I would need: GetXmaxRecent(&XmaxRecent); which find the minimum visible transaction for all active backends. This is currently used in vacuum and btbuild. I would use that visibility to set the bit. Because it is only a bit, I would need read lock but not write lock. Multiple people can set the same bit. Basically, I need to: add a global XmaxRecent and set it once per transaction if neededadd a parameter to heap_fetch to pass back an index tidifthe heap is not visible to any backend, mark the index flagupdate the index scan code to skip returning these flagedentries Of course, Tom thinks is may not be needed with his new vacuum so I may never implement it. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: