Re: Vacuum: allow usage of more than 1GB of work mem
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Claudio Freire <klaussfreire@gmail.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-07-17T17:30:15Z
Lists: pgsql-hackers
On Fri, Apr 6, 2018 at 4:25 PM, Claudio Freire <klaussfreire@gmail.com> wrote: >> True all that. My point is that the multi-segmented array isn't all that >> simple and proven, compared to an also straightforward B-tree. It's pretty >> similar to a B-tree, actually, except that it has exactly two levels, and >> the node (= segment) sizes grow exponentially. I'd rather go with a true >> B-tree, than something homegrown that resembles a B-tree, but not quite. > > I disagree. Yeah, me too. I think a segmented array is a lot simpler than a home-grown btree. I wrote a home-grown btree that ended up becoming src/backend/utils/mmgr/freepage.c and it took me a long time to get rid of all the bugs. Heikki is almost certainly better at coding up a bug-free btree than I am, but a segmented array is a dead simple data structure, or should be if done properly, and a btree is not. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Prefetch blocks during lazy vacuum's truncation scan
- 7e26e02eec90 10.0 landed
-
Explain unaccounted for space in pgstattuple.
- 71f996d22125 10.0 cited