Re: [HACKERS] Large number of open(2) calls with bulk INSERT into empty table

2012-08-23 Thread Bruce Momjian
On Tue, Aug 21, 2012 at 09:52:02AM -0400, Robert Haas wrote: > On Mon, Aug 20, 2012 at 6:44 PM, Tom Lane wrote: > > Robert Haas writes: > >> On Mon, Aug 20, 2012 at 4:27 PM, Tom Lane wrote: > >>> Surely we could just prevent creation of the FSM until the table has > >>> reached at least, say, 10

Re: [HACKERS] Large number of open(2) calls with bulk INSERT into empty table

2012-08-21 Thread Robert Haas
On Mon, Aug 20, 2012 at 6:44 PM, Tom Lane wrote: > Robert Haas writes: >> On Mon, Aug 20, 2012 at 4:27 PM, Tom Lane wrote: >>> Surely we could just prevent creation of the FSM until the table has >>> reached at least, say, 10 blocks. >>> >>> Any threshold beyond one block would mean potential sp

Re: [HACKERS] Large number of open(2) calls with bulk INSERT into empty table

2012-08-20 Thread Tom Lane
Robert Haas writes: > On Mon, Aug 20, 2012 at 4:27 PM, Tom Lane wrote: >> Surely we could just prevent creation of the FSM until the table has >> reached at least, say, 10 blocks. >> >> Any threshold beyond one block would mean potential space wastage, >> but it's hard to get excited about that

Re: [HACKERS] Large number of open(2) calls with bulk INSERT into empty table

2012-08-20 Thread Robert Haas
On Mon, Aug 20, 2012 at 4:27 PM, Tom Lane wrote: > Robert Haas writes: On the other hand, the problem of the FSM taking up 24kB for an 8kB table seems clearly worth fixing, but I don't think I have the cycles for it at present. Maybe a TODO is in order. > >> I certainly think that

Re: [HACKERS] Large number of open(2) calls with bulk INSERT into empty table

2012-08-20 Thread Tom Lane
Robert Haas writes: >>> On the other hand, the problem of the FSM taking up 24kB for an 8kB >>> table seems clearly worth fixing, but I don't think I have the cycles >>> for it at present. Maybe a TODO is in order. > I certainly think that'd be worth a TODO. Whether the rest of this is > worth

Re: [HACKERS] Large number of open(2) calls with bulk INSERT into empty table

2012-08-20 Thread Robert Haas
On Thu, Aug 16, 2012 at 9:05 PM, Bruce Momjian wrote: > A TODO for this? You mean this part? >> On the other hand, the problem of the FSM taking up 24kB for an 8kB >> table seems clearly worth fixing, but I don't think I have the cycles >> for it at present. Maybe a TODO is in order. I certain

Re: [HACKERS] Large number of open(2) calls with bulk INSERT into empty table

2012-08-16 Thread Bruce Momjian
A TODO for this? --- On Tue, Dec 6, 2011 at 02:53:42PM -0500, Robert Haas wrote: > On Tue, Dec 6, 2011 at 7:12 AM, Florian Weimer wrote: > > * Robert Haas: > > > >> I tried whacking out the call to GetPageWithFreeSpace() i

Re: [HACKERS] Large number of open(2) calls with bulk INSERT into empty table

2011-12-06 Thread Robert Haas
On Tue, Dec 6, 2011 at 8:12 PM, Andres Freund wrote: > On Tuesday, December 06, 2011 08:53:42 PM Robert Haas wrote: >> On Tue, Dec 6, 2011 at 7:12 AM, Florian Weimer wrote: >> > * Robert Haas: >> >> I tried whacking out the call to GetPageWithFreeSpace() in >> >> RelationGetBufferForTuple(), and

Re: [HACKERS] Large number of open(2) calls with bulk INSERT into empty table

2011-12-06 Thread Andres Freund
On Tuesday, December 06, 2011 08:53:42 PM Robert Haas wrote: > On Tue, Dec 6, 2011 at 7:12 AM, Florian Weimer wrote: > > * Robert Haas: > >> I tried whacking out the call to GetPageWithFreeSpace() in > >> RelationGetBufferForTuple(), and also with the unpatched code, but the > >> run-to-run random

Re: [HACKERS] Large number of open(2) calls with bulk INSERT into empty table

2011-12-06 Thread Robert Haas
On Tue, Dec 6, 2011 at 7:12 AM, Florian Weimer wrote: > * Robert Haas: > >> I tried whacking out the call to GetPageWithFreeSpace() in >> RelationGetBufferForTuple(), and also with the unpatched code, but the >> run-to-run randomness was way more than any difference the change >> made.  Is there a

Re: [HACKERS] Large number of open(2) calls with bulk INSERT into empty table

2011-12-06 Thread Florian Weimer
* Robert Haas: > I tried whacking out the call to GetPageWithFreeSpace() in > RelationGetBufferForTuple(), and also with the unpatched code, but the > run-to-run randomness was way more than any difference the change > made. Is there a better test case? I think that if you want to exercise file

Re: [HACKERS] Large number of open(2) calls with bulk INSERT into empty table

2011-11-30 Thread Heikki Linnakangas
On 30.11.2011 20:45, Tom Lane wrote: 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

Re: [HACKERS] Large number of open(2) calls with bulk INSERT into empty table

2011-11-30 Thread Tom Lane
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 ca

Re: [HACKERS] Large number of open(2) calls with bulk INSERT into empty table

2011-11-30 Thread Robert Haas
On Wed, Nov 30, 2011 at 12:29 PM, Tom Lane wrote: > Robert Haas writes: >> On Sun, Nov 27, 2011 at 10:24 AM, Florian Weimer wrote: >>> I noticed that a bulk INSERT into an empty table (which has been >>> TRUNCATEd in the same transaction, for good measure) results in a >>> curious number of open

Re: [HACKERS] Large number of open(2) calls with bulk INSERT into empty table

2011-11-30 Thread Tom Lane
Robert Haas writes: > On Sun, Nov 27, 2011 at 10:24 AM, Florian Weimer wrote: >> I noticed that a bulk INSERT into an empty table (which has been >> TRUNCATEd in the same transaction, for good measure) results in a >> curious number of open(2) calls for the FSM resource fork: > That's kind of un

Re: [HACKERS] Large number of open(2) calls with bulk INSERT into empty table

2011-11-30 Thread Robert Haas
On Sun, Nov 27, 2011 at 10:24 AM, Florian Weimer wrote: > I noticed that a bulk INSERT into an empty table (which has been > TRUNCATEd in the same transaction, for good measure) results in a > curious number of open(2) calls for the FSM resource fork: That's kind of unfortunate. It looks like ev