Received: from mailhost.intrinsity.com (gw.evsx.com [208.246.32.130]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f422pOd38275 for ; Tue, 1 May 2001 22:51:25 -0400 (EDT) (envelope-from coers@intrinsity.com) Received: from victoria.eng.evsx.com (victoria.eng.evsx.com [192.168.1.29]) by mailhost.intrinsity.com (Postfix) with ESMTP id 566623F39E; Tue, 1 May 2001 10:49:12 -0500 (CDT) Received: from intrinsity.com (IDENT:coers@fortyacres.eng.evsx.com [192.168.1.116]) by victoria.eng.evsx.com (8.10.1/8.10.1) with ESMTP id f41FnBk13405; Tue, 1 May 2001 10:49:12 -0500 (CDT) Message-ID: <3AEEDAF7.F1FA2AB6@intrinsity.com> Date: Tue, 01 May 2001 10:49:11 -0500 From: John Coers Reply-To: coers@intrinsity.com X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i586) X-Accept-Language: en MIME-Version: 1.0 To: Tom Lane Cc: pgsql-general@postgresql.org Subject: Re: Copy References: <3AE89D2C.409BEF42@intrinsity.com> <3AEDB916.BE3123A0@intrinsity.com> <3AEDDECF.6B3ED075@intrinsity.com> <391.988668966@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200105/6 X-Sequence-Number: 8606 Tom Lane wrote: > > John Coers writes: > > Does a COPY FROM block? In case I am using the wrong terminology, > > what I need to know is if I have multiple clients performing COPY FROM...PQputline() > > using asynchronous connections, will I lose data? > > No. > > > Will the server simply execute them serially? > > They'll be executed in parallel, just the same as if each client had > done a bunch of INSERTs wrapped in a BEGIN/END block. You'd only see > problems if clients inserted conflicting data (eg, identical keys in > a column with a UNIQUE index). You may care to read the documentation > about multi-version concurrency control and locking. > > regards, tom lane hmmmm...I get best performance with N=2 and force the clients to keep trying to get a connection. If I leave the default of N=32 the machine gets bogged down to a complete standstill by 32 copies of 15k rows of data. The CPU doesn't seem stressed -- what may be causing the bottleneck? -- John Coers Intrinsity, Inc. coers@intrinsity.com Austin, Texas