Re: Implement UNLOGGED clause for COPY FROM

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: "osumi(dot)takamichi(at)fujitsu(dot)com" <osumi(dot)takamichi(at)fujitsu(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Implement UNLOGGED clause for COPY FROM
Date: 2020-07-17 10:03:57
Message-ID: CAA4eK1J=j9Ydg=eg3i53hgPJUR1iS98orn2RjWuijK49hcwg6Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 17, 2020 at 9:53 AM osumi(dot)takamichi(at)fujitsu(dot)com
<osumi(dot)takamichi(at)fujitsu(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2020-07-17 10:46:23 Allow ERROR from heap_prepare_freeze_tuple to be downgraded to WARNING
Previous Message Jürgen Purtz 2020-07-17 09:32:50 Re: Additional Chapter for Tutorial