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 <[email protected]> 
Sent: Tuesday, July 26, 2022 8:43 PM
To: James Pang (chaolpan) <[email protected]>
Cc: Jim Mlodgenski <[email protected]>; [email protected]
Subject: Re: alter table xxx set unlogged take long time

"James Pang (chaolpan)" <[email protected]> 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

Reply via email to