Without step 3 , copy data take long time. Use wal_level=minimal can help make COPY load data without logging ? Thanks, James -----Original Message----- From: Tom Lane <tgl@xxxxxxxxxxxxx> Sent: Tuesday, July 26, 2022 8:43 PM To: James Pang (chaolpan) <chaolpan@xxxxxxxxx> Cc: Jim Mlodgenski <jimmy76@xxxxxxxxx>; pgsql-performance@xxxxxxxxxxxxxxxxxxxx Subject: Re: alter table xxx set unlogged take long time "James Pang (chaolpan)" <chaolpan@xxxxxxxxx> writes: > How to make it fast ? These are our steps about copy large data from Oracle to Postgres > 1. Create table in Postgres 2. Extract data from Oracle to CSV 3. Alter table set xxx unlogged, 4. Run copy command into Postgres db 5. Alter table set xxx logged 6. Create index … The easy answer is to skip steps 3 and 5. regards, tom lane