Re: Recovery performance of DROP DATABASE with many tablespaces - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Recovery performance of DROP DATABASE with many tablespaces
Date
Msg-id 20180710060405.GI1661@paquier.xyz
Whole thread Raw
In response to Re: Recovery performance of DROP DATABASE with many tablespaces  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: Recovery performance of DROP DATABASE with many tablespaces
Re: Recovery performance of DROP DATABASE with many tablespaces
List pgsql-hackers
On Thu, Jul 05, 2018 at 01:42:20AM +0900, Fujii Masao wrote:
> TBH, I have no numbers measured by the test.
> One question about your test is; how did you measure the *recovery time*
> of DROP DATABASE? Since it's *recovery* performance, basically it's not easy
> to measure that.

It would be simple to measure the time it takes to replay this single
DROP DATABASE record by putting two gettimeofday() calls or such things
and then take the time difference.  There are many methods that you
could use here, and I suppose that with a shared buffer setting of a
couple of GBs of shared buffers you would see a measurable difference
with a dozen of tablespaces or so.  You could also take a base backup
after creating all the tablespaces, connect the standby and then drop
the database on the primary to see the actual time it takes.  Your patch
looks logically correct to me because DropDatabaseBuffers is a
*bottleneck* with large shared_buffers, and it would be nice to see
numbers.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Usage of epoch in txid_current
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Re: Let's remove DSM_IMPL_NONE.