Subject: Monitoring PostgreSQL Copy Operations

From: Abdullah Ergin <[email-masked]>
Date: Wed, 12 Nov 2025 11:33:15 +0300

To monitor Copy operations in PostgreSQL in real-time, I use the “
pg_stat_progress_copy
<https://www.postgresql.org/docs/current/progress-reporting.html#COPY-PROGRESS-REPORTING>”
view tool:

Here, I specifically want to analyze the number of tuples processed by the
command, which is “tuples_processed”. However, since pg_stat_progress_copy
is a view tool, the information disappears once the operation is complete,
and it does not save the result of the copy operation anywhere. How can I
save the result of the copy operation?

Postgresql Version: 16.10

Thank You, Regards.

---

From: Ron Johnson <[email-masked]>
Date: Wed, 12 Nov 2025 09:06:41 -0500

> save the result of the copy operation?
Pipe the query output to "tee -a blarge.log"

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!