Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 38DE7A01097 for ; Wed, 30 Nov 2011 14:45:34 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RVp9w-0006MH-I7 for pgsql-hackers@postgresql.org; Wed, 30 Nov 2011 18:45:33 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id pAUIjF8E025166; Wed, 30 Nov 2011 13:45:16 -0500 (EST) To: Robert Haas cc: Florian Weimer , pgsql-hackers@postgresql.org Subject: Re: Large number of open(2) calls with bulk INSERT into empty table In-reply-to: References: <82ipm51tcd.fsf@mid.bfk.de> <23238.1322674187@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Wed, 30 Nov 2011 13:30:58 -0500" Date: Wed, 30 Nov 2011 13:45:15 -0500 Message-ID: <25165.1322678715@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -3.1 (---) X-Archive-Number: 201111/1752 X-Sequence-Number: 199236 Robert Haas writes: > Yikes! A table with 4 bytes of useful data is consuming 40kB on disk > - 8kB in the main form, 8kB in the VM fork, and 24kB in the FSM fork. > Ouch! Yeah, ouch. Why is the FSM fork eating so much space --- I'd have expected 8k there, but 24? Also, if VACUUM is going to cause the FSM to be created anyway, there may not be a lot of point to refraining from creating the first page right away. regards, tom lane