Re: [PATCH] lazy relations delete

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: [PATCH] lazy relations delete
Дата
Msg-id CA+hUKGKXm3jX-Wi0f2dMDGnNURp=9z+iOs9bQ+XypAnUyrENYQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] lazy relations delete  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
On Wed, Jan 8, 2020 at 5:20 PM Kyotaro Horiguchi
<horikyota.ntt@gmail.com> wrote:
> Relfilenode can be reused right after commit. There can be a case
> where readers of the resued relfilenode see the pages from already
> removed files left on shared buffers. On the other hand newly
> allocated buffers for the reused relfilenode are not flushed out until
> the lazy invalidate machinery actually frees the "garbage" buffers and
> it leads to a broken database after a crash.  But finally the
> machinery trashes away the buffers involving the correct ones at
> execution time.

The relfilenode can't be reused until the next checkpoint, can it?
The truncated file remains in the file system, specifically to prevent
anyone from reusing the relfilenode.  See the comment for mdunlink().
There may be other problems with the idea, but wouldn't the zombie
buffers be harmless, if they are invalidated before
SyncPostCheckpoint() unlinks the underlying files (and you never try
to flush them)?



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

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: [PATCH] lazy relations delete
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: parallel vacuum options/syntax