Speedup of relation deletes during recovery

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Speedup of relation deletes during recovery
Дата
Msg-id CAHGQGwHVQkdfDqtvGVkty+19cQakAydXn1etGND3X0PHbZ3+6w@mail.gmail.com
обсуждение исходный текст
Ответы Re: Speedup of relation deletes during recovery  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
RE: Speedup of relation deletes during recovery  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
Re: Speedup of relation deletes during recovery  (Jerry Sievers <gsievers19@comcast.net>)
Re: Speedup of relation deletes during recovery  (Jerry Sievers <gsievers19@comcast.net>)
Список pgsql-hackers
Hi,

When multiple relations are deleted at the same transaction,
the files of those relations are deleted by one call to smgrdounlinkall(),
which leads to scan whole shared_buffers only one time. OTOH,
during recovery, smgrdounlink() (not smgrdounlinkall()) is called
for each file to delete, which leads to scan shared_buffers multiple times.
Obviously this can cause to increase the WAL replay time very much
especially when shared_buffers is huge.

To alleviate this situation, I'd like to propose to change the recovery
so that it also calls smgrdounlinkall() only one time to delete multiple
relation files. Patch attached. Thought?

Regards,

-- 
Fujii Masao

Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: JIT compiling with LLVM v12.2
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: WIP: Covering + unique indexes.