tag:blogger.com,1999:blog-20038672.post8402094424846359872..comments2024-03-28T00:58:29.187-04:00Comments on Robert Haas: How Much maintenance_work_mem Do I Need?Robert Haashttp://www.blogger.com/profile/08393677427643988650noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-20038672.post-70465160165417033122022-01-13T13:12:42.381-05:002022-01-13T13:12:42.381-05:006 bytes is the size of an ItemPointerData. The rel...6 bytes is the size of an ItemPointerData. The relevant code has been moved around a few times, but in the master branch as of this writing it's in vac_max_items_to_alloc_size.Robert Haashttps://www.blogger.com/profile/08393677427643988650noreply@blogger.comtag:blogger.com,1999:blog-20038672.post-25142573745654385472022-01-13T10:29:05.550-05:002022-01-13T10:29:05.550-05:00I don't know of a constant called LAZY_ALLOC_T...I don't know of a constant called LAZY_ALLOC_TUPLES, but yes there's a limit that we won't allocate more memory than could ever possibly needed. If every TID on every page were dead, you'd have 291 dead TIDs per page and 6 bytes per TID.Robert Haashttps://www.blogger.com/profile/08393677427643988650noreply@blogger.comtag:blogger.com,1999:blog-20038672.post-9286320913158446892021-02-01T11:06:49.972-05:002021-02-01T11:06:49.972-05:00Hi Robert,
"Each dead tuple will require 6 b...Hi Robert,<br /><br />"Each dead tuple will require 6 bytes of maintenance_work_mem"<br /><br />Where do i find these information in the official documentation, or how do i verify it by myself?<br /><br />Thx<br />ThiloThilohttps://www.blogger.com/profile/16384839931286094392noreply@blogger.comtag:blogger.com,1999:blog-20038672.post-48307232657685429962020-11-18T08:26:17.691-05:002020-11-18T08:26:17.691-05:00Hi,
Thanks for sharing !
While investigating on ...Hi,<br /><br />Thanks for sharing !<br /><br />While investigating on vacuum, a college of mine has found that if "relblocks * LAZY_ALLOC_TUPLES * 6" is smaller that maintenance_work_mem, this value is used instead. We confirmed it with valgrind later on.<br /><br />Did we miss something ?<br /><br />regards<br />* LAZY_ALLOC_TUPLES was 291 on our setup<br /><br /><br /><br />Benoithttps://github.com/bloghnoreply@blogger.com