Re: Discarding relations from FSM - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Discarding relations from FSM
Date
Msg-id 200509242313.j8ONDB605806@candle.pha.pa.us
Whole thread Raw
In response to Discarding relations from FSM  ("Jim C. Nasby" <jnasby@pervasive.com>)
List pgsql-hackers
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,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: gcc4's uninitialized-variable warnings
Next
From: Bruce Momjian
Date:
Subject: Re: \x output blowing up