On Wed, Feb 5, 2025 at 9:50 AM Dmitry Koterov <dmitry.kote...@gmail.com> wrote: > > Only one index, the primary key. > > ChatGPT tells that temp files may be used, when bytea columns (or heavily > toasted ones) are utilized, but it can’t explain, why. To me, it’s hard to > believe that on the destination, the COPY stream receiver puts almost all of > the received data to temp files, then waits for COPY to finish, and only then > moves that temp files to data area, because of the large transaction or > something. Would be cool to understand the reason. >
One idea is that temporarily you drop the index before copy and see what happens. Is it possible for you to share a self-contained test case? -- With Regards, Amit Kapila.