On Wed, Nov 17, 2021 at 05:51:05PM +0000, Robert Creager wrote: > postgres`HeapTupleSatisfiesVisibility+0x42 > postgres`heapgetpage+0x237 > postgres`heapgettup_pagemode+0x5ad > postgres`heap_getnextslot+0x52 > postgres`SeqNext+0x71 > postgres`ExecScan+0xc9 > postgres`ExecLockRows+0x7b > postgres`standard_ExecutorRun+0x10a > postgres`_SPI_execute_plan+0x524 > postgres`SPI_execute_snapshot+0x116 > postgres`ri_PerformCheck+0x29e > postgres`RI_FKey_check+0x5d3 > postgres`RI_FKey_check_ins+0x21 > postgres`ExecCallTriggerFunc+0x105 > postgres`afterTriggerInvokeEvents+0x605 > postgres`AfterTriggerEndQuery+0x7a > postgres`CopyFrom+0xaca > postgres`DoCopy+0x553 > postgres`standard_ProcessUtility+0x5f9 > postgres`ProcessUtility+0x28 > 55 It shows that the process is running FK triggers. Would you show \d for the table which is the destination of COPY, and for other tables to which it has FK constraints. Also, do you have any long-running transactions ? In your first message, you showed no other queries except "idle" ones (not idle-in-transaction) but I figured I'd ask anyway. Does your COPY job run in a transaction block ? You're running pg13.2, so it would be interesting to know if the problem exists under 13.5. -- Justin