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:
Also, irrespective of performance improvement looks better to just have single xlog record for the same.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.
В списке pgsql-hackers по дате отправления: