Re: Copy - Mailing list pgsql-general

From John Coers
Subject Re: Copy
Date
Msg-id 3AEF332D.BE0C5F1@intrinsity.com
Whole thread Raw
In response to Re: Performance with Large Volumes of Data  (John Coers <coers@intrinsity.com>)
List pgsql-general
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

pgsql-general by date:

Previous
From: Ryan Mahoney
Date:
Subject: Ideal hardware configuration for pgsql
Next
From: Ryan Mahoney
Date:
Subject: Ideal hardware configuration for pgsql