Re: About the performance of startup after dropping many tables

From: Gan Jiadong <ganjd(at)huawei(dot)com>
To: 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, liyuesen(at)huawei(dot)com, yaoyiyu(at)huawei(dot)com, liuxingyu(at)huawei(dot)com, tianwengang(at)huawei(dot)com
Subject: Re: About the performance of startup after dropping many tables
Date: 2011-02-18 06:42:02
Message-ID: 009101cbcf36$f3214aa0$d963dfe0$@com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Thanks for your reply.
Of course, we will think about whether 40000 relations dropping is
reasonable. In fact, this happens in a very special scenario .
But when we analyzed this issue, we found the PG code can be rewritten to
achieve better performance. Or we can say the arithmetic of this part is not
good enough.
For example, by doing the refactoring as we done, the startup time can be
reduced from 3 minutes to 8 seconds, It is quite a great improvement,
especially for the systems with low TTR (time to recovery) requirement.

There is any problem or risk to change this part of code as we suggested?
Thank you.


Best reguards,

甘嘉栋(Gan Jiadong)
E-MAIL: ganjd(at)huawei(dot)com
Tel:+86-755-289720578
****************************************************************************
*****************************
This e-mail and its attachments contain confidential information from
HUAWEI, which is intended only for the person or entity whose address is
listed above. Any use of the information contained herein in any way
(including, but not limited to, total or partial disclosure, reproduction,
or dissemination) by persons other than the intended recipient(s) is
prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!
****************************************************************************
*****************************

-----邮件原件-----
发件人: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
发送时间: 2011年2月18日 11:37
收件人: Gan Jiadong
抄送: pgsql-hackers(at)postgresql(dot)org; liyuesen(at)huawei(dot)com; yaoyiyu(at)huawei(dot)com;
liuxingyu(at)huawei(dot)com; tianwengang(at)huawei(dot)com
主题: Re: [HACKERS] About the performance of startup after dropping many
tables

Gan Jiadong <ganjd(at)huawei(dot)com> writes:
> we have PG 8.3.13 in our system. When running performance cases, we find
the
> startup recovery cost about 3 minutes. It is too long in our system.

Maybe you should rethink the assumption that dropping 40000 tables is a
cheap operation. Why do you have that many in the first place, let
alone that many that you drop and recreate frequently? Almost
certainly, you need a better-conceived schema.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gan Jiadong 2011-02-18 06:57:02 Re: About the performance of startup after dropping many tables
Previous Message Tom Lane 2011-02-18 06:07:54 Re: knngist - 0.8