Re: Is there a way to tell how far along a COPY is in the process?

From: Erik Jones <erik(at)myemma(dot)com>
To: Keaton Adams <kadams(at)mxlogic(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Is there a way to tell how far along a COPY is in the process?
Date: 2007-11-05 19:54:15
Message-ID: 2104FECE-CFF4-497E-94EC-17A78E2FAA30@myemma.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)myemma(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-11-05 19:54:33 Re: running postgresql
Previous Message Erik Jones 2007-11-05 19:51:04 Re: running postgresql