Re: Recovery performance of DROP DATABASE with many tablespaces

Поиск
Список
Период
Сортировка
От Ashwin Agrawal
Тема Re: Recovery performance of DROP DATABASE with many tablespaces
Дата
Msg-id CALfoeivwYPNOYYayiXLiOSxwFr8-5YM8RMwwG4Hkjdf7PJCdkg@mail.gmail.com
обсуждение исходный текст
Ответ на Recovery performance of DROP DATABASE with many tablespaces  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-hackers

On Mon, Jun 4, 2018 at 9:46 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
Generally the recovery performance of DROP DATABASE is not critical
for many users. But unfortunately my colleague's project might need to
sometimes drop the database using multiple tablespaces, for some reasons.
So, if the fix is not so complicated, I think that it's worth applying that.

Agree, in isolation need for this improvement is not felt, but yes any improvements for single serialized replay process is definitely helpful.


The straight approach to avoid such unnecessary scans is to change
DROP DATABASE so that it generates only one XLOG_DBASE_DROP record,
and register the information of all the tablespace into it. Then, WAL replay
of XLOG_DBASE_DROP record scans shared_buffers once and deletes
all tablespaces. POC patch is attached.

Also, irrespective of performance improvement looks better to just have single xlog record for the same.

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [PATCH] Trim trailing whitespace in vim and emacs
Следующее
От: Andres Freund
Дата:
Сообщение: Why is fncollation in FunctionCallInfoData rather than fmgr_info?