X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1E84CD93EB; Fri, 4 Nov 2005 14:01:22 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 02236-03; Fri, 4 Nov 2005 18:01:20 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 928E5D9385; Fri, 4 Nov 2005 14:01:20 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id jA4I1KVM015927; Fri, 4 Nov 2005 13:01:20 -0500 (EST) To: "Merlin Moncure" Cc: pgsql-performance@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: insert performance for win32 In-reply-to: <6EE64EF3AB31D5448D0007DD34EEB3417DD7D3@Herge.rcsinc.local> References: <6EE64EF3AB31D5448D0007DD34EEB3417DD7D3@Herge.rcsinc.local> Comments: In-reply-to "Merlin Moncure" message dated "Fri, 04 Nov 2005 12:56:02 -0500" Date: Fri, 04 Nov 2005 13:01:20 -0500 Message-ID: <15926.1131127280@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.006 required=5 tests=[AWL=0.006] X-Spam-Score: 0.006 X-Spam-Level: X-Archive-Number: 200511/86 X-Sequence-Number: 15343 "Merlin Moncure" writes: > Nailed it. > problem is in mainloop.c -> setup_cancel_handler. Apparently you can > have multiple handlers and windows keeps track of them all, even if they > do the same thing. Keeping track of so many system handles would > naturally slow the whole process down. Yipes. So we really want to do that only once. AFAICS it is appropriate to move the sigsetjmp and setup_cancel_handler calls in front of the per-line loop inside MainLoop --- can anyone see a reason not to? I'm inclined to treat this as an outright bug, not just a minor performance issue, because it implies that a sufficiently long psql script would probably crash a Windows machine. regards, tom lane