Received: from sss.pgh.pa.us (sss.pgh.pa.us [216.151.103.158]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3UMGF372177 for ; Mon, 30 Apr 2001 18:16:15 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f3UMG6R00394; Mon, 30 Apr 2001 18:16:06 -0400 (EDT) To: coers@intrinsity.com cc: pgsql-general@postgresql.org Subject: Re: Copy In-reply-to: <3AEDDECF.6B3ED075@intrinsity.com> References: <3AE89D2C.409BEF42@intrinsity.com> <3AEDB916.BE3123A0@intrinsity.com> <3AEDDECF.6B3ED075@intrinsity.com> Comments: In-reply-to John Coers message dated "Mon, 30 Apr 2001 16:53:19 -0500" Date: Mon, 30 Apr 2001 18:16:06 -0400 Message-ID: <391.988668966@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200104/1267 X-Sequence-Number: 8590 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