Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xR8uQ-00000000ifv-1Iuu for pgsql-bugs@arkaria.postgresql.org; Wed, 11 Nov 2026 14:02:42 +0000 Received: from localhost ([127.0.0.1]:36498 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xR8uO-0000000BPbv-3xpu for pgsql-bugs@arkaria.postgresql.org; Wed, 11 Nov 2026 14:02:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]:49334) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xR8Pq-0000000BA7m-1MV4 for pgsql-bugs@lists.postgresql.org; Wed, 11 Nov 2026 13:31:06 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xR8Pp-00000000NWt-28Og for pgsql-bugs@lists.postgresql.org; Wed, 11 Nov 2026 13:31:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:Cc:From:To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:Sender:Content-ID: Content-Description:In-Reply-To:References; bh=YVQNk4WlsDuO1O3eT5yOfZkDwu53TtMkQ7zI7C8vHjc=; b=D5TEF03Tw9/nsilTs9ZdJZghlp rnAOPcX1r/H+T/5rjhGvcp1NowsEzKP7LNrZjEouMoUrCTeTyVXEB6SrIbdDeazgLcld0puNFTp/F j0PZ6MSrips8d92ozzDQi+6qtxRJd1t4PHCjJ5qm6yEyePDPqKmQrJM8FB8v3Jxvdj7ZIAgyofWAp xS9YjYt0psviZVJp64RRiQ8YQHGUgB90D82P4TWS+R9oYxT3DJLkxXacPpZqAhLL0QHmqdl1CkOU2 H+KSqO2KHtspMqKpVX1nfn8OyRB4TPmhMqcmRUYp2hm+MVut3ECTT8azcm0+dmv1dEzJ8ZeWMK3i+ Jt5BR6cw==; Received: from wrigleys.postgresql.org ([2a02:16a8:dc51::60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xR8Po-000000012kM-2eOi for pgsql-bugs@lists.postgresql.org; Wed, 11 Nov 2026 13:31:05 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xR8Pn-00000002icr-2Xpz for pgsql-bugs@lists.postgresql.org; Wed, 11 Nov 2026 13:31:03 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #19879: Blocked COPY FROM reports NULL command and type in pg_stat_progress_copy To: pgsql-bugs@lists.postgresql.org From: PG Bug reporting form Cc: imchifan8@gmail.com Reply-To: imchifan8@gmail.com, pgsql-bugs@lists.postgresql.org Date: Wed, 11 Nov 2026 13:30:55 +0000 Message-ID: <19879-79f1b50f5f75a9e9@postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk The following bug has been logged on the website: Bug reference: 19879 Logged by: Noah Email address: imchifan8@gmail.com PostgreSQL version: 18.6 Operating system: Linux/amd64 Description: =20 A server-side COPY FROM that blocks while opening a FIFO appears in pg_stat_progress_copy with the correct relation OID but NULL command and type. The view should identify the running command as COPY FROM and its I/O type as FILE, as documented for pg_stat_progress_copy. How to repeat: Save this as run.sh: #!/usr/bin/env bash set -euo pipefail : "${PG_BINDIR:?set PG_BINDIR to the target PostgreSQL bin directory}" base=3D"$PWD/work" data=3D"$base/data" sock=3D"$base/socket" fifo=3D"$base/input.fifo" mkdir -p "$base" "$sock" "$PG_BINDIR/initdb" -D "$data" --no-locale --encoding=3DUTF8 >/dev/null "$PG_BINDIR/pg_ctl" -D "$data" -o "-k $sock -c listen_addresses=3D''" -w st= art >/dev/null cleanup() { "$PG_BINDIR/pg_ctl" -D "$data" -m immediate -w stop >/dev/null 2>&1 || true } trap cleanup EXIT "$PG_BINDIR/psql" -X -h "$sock" -d postgres -v ON_ERROR_STOP=3D1 -c 'CREATE TABLE copy_progress_target(i int)' mkfifo "$fifo" "$PG_BINDIR/psql" -X -h "$sock" -d postgres -v ON_ERROR_STOP=3D1 \ -c "COPY copy_progress_target FROM '$fifo'" >"$base/copy.out" 2>"$base/copy.err" & copy_pid=3D$! for _ in $(seq 1 100); do row=3D$("$PG_BINDIR/psql" -XAt -h "$sock" -d postgres -c \ "SELECT coalesce(command,'') || '|' || coalesce(type,'') FROM pg_stat_progress_copy WHERE relid=3D'copy_progress_target'::regclass") test -n "$row" && break sleep 0.05 done printf 'observed=3D%s\n' "$row" printf '1\n' >"$fifo" wait "$copy_pid" test "$row" =3D 'COPY FROM|FILE' Run it as a non-root operating-system user from an otherwise empty writable directory: chmod +x run.sh PG_BINDIR=3D/path/to/postgresql/bin ./run.sh On the affected build, it prints: observed=3D| The final test then exits nonzero. The progress row exists and has the relation OID for copy_progress_target, but its command and type are missing. Writing to the FIFO allows COPY to finish; the metadata is then populated or the progress row disappears. The issue was reproduced on PostgreSQL 18.6 (Debian 18.6-1.pgdg13+2) on Linux/amd64. COPY execution and table data are unaffected. This occurs when an authorized server-side COPY FROM opens a filesystem object whose open blocks while another session monitors pg_stat_progress_copy.