RE: Implement UNLOGGED clause for COPY FROM

From: "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com>
To: "'David G(dot) Johnston'" <david(dot)g(dot)johnston(at)gmail(dot)com>, "osumi(dot)takamichi(at)fujitsu(dot)com" <osumi(dot)takamichi(at)fujitsu(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: Implement UNLOGGED clause for COPY FROM
Date: 2020-07-09 06:21:43
Message-ID: TYAPR01MB2990C8CD6F13D48DF226FC3FFE640@TYAPR01MB2990.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
> This step seems to invalidate the idea outright. The checkpoint command is superuser only and isn’t table specific. This seems to require both those things to be changed.

Perhaps FlushRelationBuffers() followed by smgrsync() can be used instead. Or, depending on the assumed use case (e.g. the DBA adds data regularly for analytics), we may allow COPY UNLOGGED to be used only by superusers and some special pg_ roles, and COPY UNLOGGED performs checkpoints. Anyway, I kind of feel that COPY UNLOGGED needs some special privileges, because it renders the table unrecoverable and not being replicated to the standby.

Regards
Takayuki Tsunakawa

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Khandekar 2020-07-09 06:27:34 Re: calling procedures is slow and consumes extra much memory against calling function
Previous Message movead.li@highgo.ca 2020-07-09 06:19:46 Re: A patch for get origin from commit_ts.