From 1ebc4f75391140c5758f5b690688178f244dcc1b Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Thu, 27 Nov 2008 13:32:26 +0000 Subject: [PATCH] Don't force creation of the FSM on searches. It will still be created as soon as the first page fills up, and is marked as (almost) full, though. --- src/backend/storage/freespace/freespace.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c index 98b503f3b4..7f65487de2 100644 --- a/src/backend/storage/freespace/freespace.c +++ b/src/backend/storage/freespace/freespace.c @@ -638,13 +638,8 @@ fsm_search(Relation rel, uint8 min_cat) Buffer buf; uint8 max_avail = 0; - /* - * Read the FSM page. The root page is created if it doesn't exist - * yet, to save future searchers the effort of having to call - * smgrnblocks() in fsm_readbuf(), only to see that the FSM is - * completely empty. - */ - buf = fsm_readbuf(rel, addr, (addr.level != FSM_ROOT_LEVEL)); + /* Read the FSM page. */ + buf = fsm_readbuf(rel, addr, false); /* Search within the page */ if (BufferIsValid(buf)) -- 2.39.5