]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Add two IO wait events for COPY FROM/TO on a pipe/file/program
authorMichael Paquier <michael@paquier.xyz>
Tue, 3 Feb 2026 03:20:41 +0000 (12:20 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 3 Feb 2026 03:20:41 +0000 (12:20 +0900)
commite05a24c2d4eab3dd76741dc6e6c18bb0584771c5
tree4369f94007d5e980ba2047d80d347ed9d0838de5
parent213fec296f419af8f199a721a9986e879656555c
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@postgres.ai>
Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com>
Reviewed-by: Sami Imseih <samimseih@gmail.com>
Discussion: https://postgr.es/m/CAM527d_iDzz0Kqyi7HOfqa-Xzuq29jkR6AGXqfXLqA5PR5qsng@mail.gmail.com
src/backend/commands/copyfromparse.c
src/backend/commands/copyto.c
src/backend/utils/activity/wait_event_names.txt