Re: HOT for PostgreSQL 8.3
От | Bruce Momjian |
---|---|
Тема | Re: HOT for PostgreSQL 8.3 |
Дата | |
Msg-id | 200702100228.l1A2Sr308300@momjian.us обсуждение исходный текст |
Ответ на | Re: HOT for PostgreSQL 8.3 ("Simon Riggs" <simon@2ndquadrant.com>) |
Список | pgsql-hackers |
Simon Riggs wrote: > > I need clarification here. Is removing dead heap tuple always going to > > require an index scan, or was this just for chilling a row (adding an > > index)? > > We can remove a tupled marked HEAP_ONLY_TUPLE when it is status > HEAPTUPLE_DEAD. The HEAP_UPDATE_ROOT tuple can be reduced to a > TupleStub, but not removed. Multiple tuples in the chain can be removed, > though the HEAP_UPDATE_ROOT's t_ctid must be modified to point to the > first non-removed tuple in the chain. All of that can be done when we > hold a CleanupLock on the block, without reference to the indexes; this > can be performed on-demand, when we attempt an UPDATE. This is similar > to what already happens prior to a btree split operation. (This could > also be performed by bgwriter, but that isn't proposed at this time > because the buffer transit time through the cache is often not long > enough to allow tuples to die and get benefit from space reuse). > > TupleStubs can be marked for removal by a pointer-swing operation during > normal VACUUM, i.e. it will require touching the indexes. OK, that sounds like a good plan. Thanks. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
В списке pgsql-hackers по дате отправления: