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 CAA4eK1J=j9Ydg=eg3i53hgPJUR1iS98orn2RjWuijK49hcwg6Q@mail.gmail.com
Whole thread Raw
In response to RE: Implement UNLOGGED clause for COPY FROM  ("osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>)
Responses RE: Implement UNLOGGED clause for COPY FROM
List pgsql-hackers
On Fri, Jul 17, 2020 at 9:53 AM osumi.takamichi@fujitsu.com
<osumi.takamichi@fujitsu.com> wrote:
>
> Lastly, I have to admit that
> the status of target table where data is loaded by COPY UNLOGGED would be marked
> as invalid and notified to standbys under replication environment
> from the point in time when the operation takes place.
> But, I'm going to allow users with special privileges (like DBA) to use this clause
> and this kind of tables would be judged by them not to replicate.
> Of course, I'm thinking better idea but now what I can say is like this for replication.
>

If you are going to suggest users not to replicate such tables then
why can't you suggest them to create such tables as UNLOGGED in the
first place?  Another idea could be that you create an 'unlogged'
table, copy the data to it.  Then perform Alter Table .. SET Logged
and attach it to the main table.  I think for this you need the main
table to be partitioned but I think if that is possible then it might
be better than all the hacking you are proposing to do in the server
for this special operation.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Parallel Seq Scan vs kernel read ahead
Next
From: Dilip Kumar
Date:
Subject: Allow ERROR from heap_prepare_freeze_tuple to be downgraded to WARNING