pgsql: Add two IO wait events for COPY FROM/TO on a pipe/file/program

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add two IO wait events for COPY FROM/TO on a pipe/file/program
Date: 2026-02-03 03:27:44
Message-ID: E1vn74p-000psm-1c@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add two IO wait events for COPY FROM/TO on a pipe/file/program

Two wait events are added to the COPY FROM/TO code:
* COPY_FROM_READ: reading data from a copy_file.
* COPY_TO_WRITE: writing data to a copy_file.

In the COPY code, copy_file can be set when processing a command through
the pipe mode (for the non-DestRemote case), the program mode or the
file mode, when processing fread() or fwrite() on it.

Author: Nikolay Samokhvalov <nik(at)postgres(dot)ai>
Reviewed-by: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Reviewed-by: Sami Imseih <samimseih(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAM527d_iDzz0Kqyi7HOfqa-Xzuq29jkR6AGXqfXLqA5PR5qsng@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e05a24c2d4eab3dd76741dc6e6c18bb0584771c5

Modified Files
--------------
src/backend/commands/copyfromparse.c | 2 ++
src/backend/commands/copyto.c | 2 ++
src/backend/utils/activity/wait_event_names.txt | 2 ++
3 files changed, 6 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2026-02-03 08:07:51 pgsql: Change StaticAssertVariableIsOfType to be a declaration
Previous Message Michael Paquier 2026-02-03 02:25:43 pgsql: Fix incorrect errno in OpenWalSummaryFile()