Scott Ribe <scott_ribe@elevated-dev.com> writes:
> Is there any way to get some insight into the progress of:
> insert into foo select distinct on (...) from bar where...
Watching the physical size of the foo table might be close enough.
Or you could run contrib/pgstattuple's pgstattuple() function every so
often --- it will report the uncommitted tuples as "dead", which is
inaccurate, but you'd be able to see how fast the number is increasing.
regards, tom lane