RE: Implement UNLOGGED clause for COPY FROM - Mailing list pgsql-hackers

From tsunakawa.takay@fujitsu.com
Subject RE: Implement UNLOGGED clause for COPY FROM
Date
Msg-id TYAPR01MB2990ED6B394A9B4B51D28569FE240@TYAPR01MB2990.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: Implement UNLOGGED clause for COPY FROM  (Peter Smith <smithpb2250@gmail.com>)
Responses Re: Implement UNLOGGED clause for COPY FROM
List pgsql-hackers
From: Peter Smith <smithpb2250@gmail.com>
On Thu, Sep 10, 2020 at 7:16 PM tsunakawa.takay@fujitsu.com
> <tsunakawa.takay@fujitsu.com> wrote:
> > ALTER TABLE takes long time proportional to the amount of existing data,
> while wal_level = none doesn't.
> 
> Right, but if wal_level=none is considered OK for that table with
> existing data, then why not just create the table UNLOGGED in the
> first place? (or ALTER it to set UNLOGGED just one time and then leave
> it as UNLOGGED).

The target tables sometimes receive updates (for data maintenance and/or correction).  They don't want those updates to
belost due to the database server crash.  Unlogged tables lose their entire contents during crash recovery.
 

Please think like this: logging is is the norm, and unlogged operations are exceptions/hacks for some requirement of
whichthe user wants to minimize the use.
 


Regards
Takayuki Tsunakawa





pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: New statistics for tuning WAL buffer size
Next
From: "Hunter, James"
Date:
Subject: Re: Fix for parallel BTree initialization bug