pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: James Pang (chaolpan) <chaolpan@cisco.com>
Cc: Jim Mlodgenski <jimmy76@gmail.com>
Cc: pgsql-performance@lists.postgresql.org <pgsql-performance@lists.postgresql.org>
Subject: Re: alter table xxx set unlogged take long time
Date: Tue, 26 Jul 2022 08:42:52 -0400
Message-ID: <2240967.1658839372@sss.pgh.pa.us> (raw)
In-Reply-To: <PH0PR11MB51919A15ED33C356120145F7D6949@PH0PR11MB5191.namprd11.prod.outlook.com>
References: <PH0PR11MB5191F1E9F55101897E453814D6949@PH0PR11MB5191.namprd11.prod.outlook.com>
	<CAB_5SRdsCDx8Mq974S=WxWBG+vSD7axZVtAoTvMvzQ+6ghffuA@mail.gmail.com>
	<PH0PR11MB51919A15ED33C356120145F7D6949@PH0PR11MB5191.namprd11.prod.outlook.com>

"James Pang (chaolpan)" <chaolpan@cisco.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





view thread (14+ messages)  latest in thread

Message-ID: <2240967.1658839372@sss.pgh.pa.us>
Permalink:  ../2240967.1658839372@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2240967.1658839372@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, chaolpan@cisco.com, jimmy76@gmail.com, pgsql-performance@lists.postgresql.org
  Subject: Re: alter table xxx set unlogged take long time
  In-Reply-To: <2240967.1658839372@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox