Jim C. Nasby wrote: > Per http://lnk.nu/developer.postgresql.org/43b.c: > > * The number of distinct relations tracked is limited by a configuration > * variable (MaxFSMRelations). When this would be exceeded, we discard the > * least recently used relation. A doubly-linked list with move-to-front > * behavior keeps track of which relation is least recently used. > > Rather than keeping track of which relation was last used (presumably > everytime something hits the FSM), wouldn't it make more sense to just > drop the relation with the smallest amount of free space in the map?
The one with the smallest amount of free space might be the one we want to vacuum next, so perhaps it will be added to very soon. The _usage_ of the free space is a much better indicator. > Of course maybe a better question is why we even limit based on the > number of relations... Limited shared memory. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster