Re: Gauging progress of COPY?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Gauging progress of COPY?
Date: 2022-01-20 18:13:18
Message-ID: 892470.1642702398@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Wells Oliver <wells(dot)oliver(at)gmail(dot)com> writes:
> Is there some clever way to gauge the progress of a COPY command? i.e. you
> know it has 10m rows, but you can't SELECT COUNT(*).

If it's a COPY IN (to a table) you could monitor growth of the
physical size of the table, cf pg_relation_size(). This isn't
terribly satisfactory if you're not clear on how much space each
row will take, but it's something.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Sbob 2022-01-20 18:15:04 AWS 'Instance Features'?
Previous Message Wells Oliver 2022-01-20 18:00:33 Gauging progress of COPY?