Re: Is there a way to tell how far along a COPY is in the process? - Mailing list pgsql-general

From Erik Jones
Subject Re: Is there a way to tell how far along a COPY is in the process?
Date
Msg-id 2104FECE-CFF4-497E-94EC-17A78E2FAA30@myemma.com
Whole thread Raw
In response to Is there a way to tell how far along a COPY is in the process?  (Keaton Adams <kadams@mxlogic.com>)
List pgsql-general
On Nov 5, 2007, at 1:32 PM, Keaton Adams wrote:

>
> I’m looking for a way to see how many rows have been processed
> while a COPY is actually running.  I can’t seem to find a pg_stat
> table/view that will give me this level of visibility into the
> process.
>
> Is there any way to do this, to tell the number of rows processed
> during a COPY into a table while the COPY is still running?

No, because changes made by any given transaction are not visible to
other transactions until that transaction commits, which would be
when the COPY completes if it is the only statement in the
transaction.  What you could do is split the file whose data you're
COPYing in into smaller pieces and run separate, sequential COPYs if
you really need something along those lines.

Erik Jones

Software Developer | Emma®
erik@myemma.com
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: running postgresql
Next
From: Tom Lane
Date:
Subject: Re: Filter sequence