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

From Amit Kapila
Subject Re: Implement UNLOGGED clause for COPY FROM
Date
Msg-id CAA4eK1KeCW3Uvux4WQVbEJvZ-=oO7qFXZjPZtsUwLcO-BGd84g@mail.gmail.com
Whole thread Raw
In response to RE: Implement UNLOGGED clause for COPY FROM  ("tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>)
Responses RE: Implement UNLOGGED clause for COPY FROM
List pgsql-hackers
On Thu, Aug 27, 2020 at 7:04 AM tsunakawa.takay@fujitsu.com
<tsunakawa.takay@fujitsu.com> wrote:
>
> From: Amit Kapila <amit.kapila16@gmail.com>
> > So you want your users to shutdown and restart the server before Copy
> > because that would be required if you want to change the wal_level.
>
> Yes.  They seem to be fine with it, as far as I heard from a person who is involved in the system design.
>
>
> > However, even if we do that, users who are running the server
> > previously with wal_level as 'replica' won't be happy after doing this
> > change. Because if they change the wal_level to 'none' for certain
> > operations like bulk load and then again change back the mode to
> > 'replica' they need to back up the database again to setup 'replica'
> > as they can't continue replication from the previous point (consider
> > update on a page for which previously WAL was not written).
>
> Yes, it requires the database backup.  The database backup should be a daily task anyway, so I expect it wouldn't
imposeextra maintenance burdon on the user.
 
>

Sure, but on a daily basis, one requires only incremental WAL to
complete the backup but in this case, it would require the entire
database back up unless we have some form of block-level incremental
backup method. OTOH, I don't deny that there is some use case with
wal_level = 'none' for initial data loading as MySQL provides but I
think that is a separate feature than what is proposed here (Copy
Unlogged). It might be better if you can start a separate thread for
that with some more details on the implementation side as well.

-- 
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Ranier Vilela
Date:
Subject: Clang Address Sanitizer (Postgres14) Detected Memory Leaks
Next
From: "tsunakawa.takay@fujitsu.com"
Date:
Subject: RE: Implement UNLOGGED clause for COPY FROM