From: | "James Pang (chaolpan)" <chaolpan(at)cisco(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Jim Mlodgenski <jimmy76(at)gmail(dot)com>, "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org> |
Subject: | RE: alter table xxx set unlogged take long time |
Date: | 2022-07-26 12:45:40 |
Message-ID: | PH0PR11MB51917F811DDACDBC4B0D9AEAD6949@PH0PR11MB5191.namprd11.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
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(at)sss(dot)pgh(dot)pa(dot)us>
Sent: Tuesday, July 26, 2022 8:43 PM
To: James Pang (chaolpan) <chaolpan(at)cisco(dot)com>
Cc: Jim Mlodgenski <jimmy76(at)gmail(dot)com>; pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: alter table xxx set unlogged take long time
"James Pang (chaolpan)" <chaolpan(at)cisco(dot)com> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Mlodgenski | 2022-07-26 12:52:59 | Re: alter table xxx set unlogged take long time |
Previous Message | Tom Lane | 2022-07-26 12:42:52 | Re: alter table xxx set unlogged take long time |