Re: alter table xxx set unlogged take long time - Mailing list pgsql-performance

From Joe Conway
Subject Re: alter table xxx set unlogged take long time
Date
Msg-id 5482d675-5843-271d-cc3c-9df742249baf@joeconway.com
Whole thread Raw
In response to RE: alter table xxx set unlogged take long time  ("James Pang (chaolpan)" <chaolpan@cisco.com>)
List pgsql-performance
On 7/28/22 03:47, James Pang (chaolpan) wrote:
> Does  "wal_level=minimal" help reducing  wal emitting a lot for COPY
> and CREATE INDEX?   We plan to remove  "set unlogged/log" , instead ,
> just set "wal_level=minimal" ,then COPY data in parallel, then create
> index.

(Note - please don't top post on these lists)

Yes, wal_level = minimal is a big help in my experience if you can 
tolerate it.

Similarly synchronous_commit = off might help as long as you are 
prepared to reload some data in the event of a crash (which generally is 
true when bulk loading). As noted in the docs:

   This parameter can be changed at any time; the
   behavior for any one transaction is determined by
   the setting in effect when it commits. It is
   therefore possible, and useful, to have some
   transactions commit synchronously and others
   asynchronously.


-- 
Joe Conway
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



pgsql-performance by date:

Previous
From: "James Pang (chaolpan)"
Date:
Subject: RE: alter table xxx set unlogged take long time
Next
From: Rick Otten
Date:
Subject: Re: Postgresql 14 partitioning advice