From: | Ashwin Agrawal <aagrawal(at)pivotal(dot)io> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Recovery performance of DROP DATABASE with many tablespaces |
Date: | 2018-06-05 20:27:36 |
Message-ID: | CALfoeivwYPNOYYayiXLiOSxwFr8-5YM8RMwwG4Hkjdf7PJCdkg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jun 4, 2018 at 9:46 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Jonathan S. Katz | 2018-06-05 20:30:10 | Re: Code of Conduct plan |
Previous Message | Joshua D. Drake | 2018-06-05 20:27:07 | Re: Code of Conduct plan |