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 108AED91AD; Fri, 4 Nov 2005 14:15:46 -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 06251-07; Fri, 4 Nov 2005 18:15:44 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from candle.pha.pa.us (candle.pha.pa.us [64.139.89.126]) by svr1.postgresql.org (Postfix) with ESMTP id 1D290D9079; Fri, 4 Nov 2005 14:15:43 -0400 (AST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id jA4IFhX16474; Fri, 4 Nov 2005 13:15:43 -0500 (EST) From: Bruce Momjian Message-Id: <200511041815.jA4IFhX16474@candle.pha.pa.us> Subject: Re: insert performance for win32 In-Reply-To: <15926.1131127280@sss.pgh.pa.us> To: Tom Lane Date: Fri, 4 Nov 2005 13:15:43 -0500 (EST) Cc: Merlin Moncure , pgsql-performance@postgresql.org, pgsql-hackers@postgresql.org X-Mailer: ELM [version 2.4ME+ PL121 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.014 required=5 tests=[AWL=0.014] X-Spam-Score: 0.014 X-Spam-Level: X-Archive-Number: 200511/89 X-Sequence-Number: 15346 Tom Lane wrote: > "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? Nope. > 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. Agreed. -- 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, Pennsylvania 19073