pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Coers <coers@intrinsity.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general@postgresql.org
Subject: Re: Copy
Date: Tue, 01 May 2001 17:05:33 -0500
Message-ID: <3AEF332D.BE0C5F1@intrinsity.com> (raw)
References: <Pine.LNX.4.21.0104261634460.2565-100000@olympus.scw.org>
	<3AE89D2C.409BEF42@intrinsity.com>
	<3AEDB916.BE3123A0@intrinsity.com>
	<3AEDDECF.6B3ED075@intrinsity.com>
	<391.988668966@sss.pgh.pa.us>

Tom Lane wrote:
> 
> John Coers <coers@intrinsity.com> 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.

Do I need to do a PQconnectStart(),PQconnectPoll connection to make the server process
the COPY's in parallel, or does that just affect the client-side thread?  How about a
PQconnectdb() and then PQsetnonblocking()?

Can I just do a PQconnectdb()?

I am unclear on how these different connection types affect the client threads vs. the server threads.

-- 
John Coers            Intrinsity, Inc.        
coers@intrinsity.com  Austin, Texas



view thread (8+ messages)  latest in thread

Message-ID: <3AEF332D.BE0C5F1@intrinsity.com>
Permalink:  ../3AEF332D.BE0C5F1@intrinsity.com/
Also on:    postgresql.org/message-id/3AEF332D.BE0C5F1@intrinsity.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: coers@intrinsity.com, tgl@sss.pgh.pa.us, pgsql-general@postgresql.org
  Subject: Re: Copy
  In-Reply-To: <3AEF332D.BE0C5F1@intrinsity.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox