TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Visualizing PostgreSQL Vacuum Progress

73 pointsby helperalmost 6 years ago

1 comment

barkingalmost 6 years ago
Jim Starkey the man who probably invented mvcc back in the 80s had some interesting thoughts on this topic. Firebird a fork of Interbase used to rely on visiting transactions to clear up garbage. This meant that old versions of a record would hang around until a query pulled the record up, saw there garbage versions and deleted them. At some point Firebird introduced a dedicated garbage collection thread to do the job instead, which to me sounds a bit like how vacuum works. Here is what he had to say about it:<p><i>...but the garbage collect thread is an unmitigated disaster. The theory of cooperative garbage collection is that a) garbage collection only takes place when the page has already been read, minimizing additional I&#x2F;O, and b) it keeps the length of record chains to the theoretical minimum. The garbage collect thread not only defeats both of these, but is only of those rare features that the higher the load, the worse it works -- under load record chains get longer, which increases the cost of index and blob updates as all old record versions must be fetched and scanned, which increases the load even more, causing the garbage collect thread to fall farther and farther behind, increasing the load even more -- well, you get the picture.</i><p><a href="https:&#x2F;&#x2F;sourceforge.net&#x2F;p&#x2F;firebird&#x2F;mailman&#x2F;message&#x2F;17015961&#x2F;" rel="nofollow">https:&#x2F;&#x2F;sourceforge.net&#x2F;p&#x2F;firebird&#x2F;mailman&#x2F;message&#x2F;17015961&#x2F;</a>
评论 #19993347 未加载