Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints
Дата
Msg-id 20211215184544.GA4440@momjian.us
обсуждение исходный текст
Ответ на Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints  (Dilip Kumar <dilipbalaut@gmail.com>)
Ответы Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints  (Dilip Kumar <dilipbalaut@gmail.com>)
Список pgsql-hackers
On Thu, Dec  2, 2021 at 07:19:50PM +0530, Dilip Kumar wrote:
From the patch:

> Currently, CREATE DATABASE forces a checkpoint, then copies all the files,
> then forces another checkpoint. The comments in the createdb() function
> explain the reasons for this. The attached patch fixes this problem by making
> create database completely WAL logged so that we can avoid the checkpoints.
> 
> This can also be useful for supporting the TDE. For example, if we need different
> encryption for the source and the target database then we can not re-encrypt the
> page data if we copy the whole directory.  But with this patch, we are copying
> page by page so we have an opportunity to re-encrypt the page before copying that
> to the target database.

Uh, why is this true?  Why can't we just copy the heap/index files 8k at
a time and reencrypt them during the file copy, rather than using shared
buffers?

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  If only the physical world exists, free will is an illusion.




В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Bossart, Nathan"
Дата:
Сообщение: Re: archive modules
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Privilege required for IF EXISTS event if the object already exists