答复: response time is very long in PG9.5.5 using psql or jdbc

From: 石勇虎 <SHIYONGHU651(at)pingan(dot)com(dot)cn>
To:
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: 答复: response time is very long in PG9.5.5 using psql or jdbc
Date: 2018-02-13 04:48:37
Message-ID: a82e97e75d05417da514e2c82dd8fb51@pingan.com.cn
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Yes,we have more than 500 thousand of objects,and the total size of the database is almost 10TB.Just as you said,we may need to reduce the objects number,or you have any better solution?
And I also have a question that if the backend's internal caches of catalog is shared with other users or sessions?if the pgbouncer is usefull?

[postgres:5521(at)eits] [02-13.11:42:25]=# select count(1) from pg_class;
count
--------
537384
(1 row)

-----邮件原件-----
发件人: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
发送时间: 2018年2月13日 10:30
收件人: 石勇虎 <SHIYONGHU651(at)pingan(dot)com(dot)cn>
抄送: pgsql-bugs(at)postgresql(dot)org
主题: Re: response time is very long in PG9.5.5 using psql or jdbc

=?gb2312?B?yq/Twrui?= <SHIYONGHU651(at)pingan(dot)com(dot)cn> writes:
> In our product database,we met a problem .when we login in the
> database using psql or jdbc ,the response time is very long.

I'm going to guess that this has something to do with very slow population of the backend's internal caches during the first query of a session.
That suggests bloated system catalogs. Do you have an unusually large number of database objects (e.g., millions of tables or functions)?
Or is it possible that some transaction(s) transiently created a lot of objects, and vacuuming hasn't been able to shrink the catalogs back down?

regards, tom lane

********************************************************************************************************************************
The information in this email is confidential and may be legally privileged. If you have received this email in error or are not the intended recipient, please immediately notify the sender and delete this message from your computer. Any use, distribution, or copying of this email other than by the intended recipient is strictly prohibited. All messages sent to and from us may be monitored to ensure compliance with internal policies and to protect our business.
Emails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. Anyone who communicates with us by email is taken to accept these risks.

收发邮件者请注意:
本邮件含涉密信息,请保守秘密,若误收本邮件,请务必通知发送人并直接删去,不得使用、传播或复制本邮件。
进出邮件均受到本公司合规监控。邮件可能发生被截留、被修改、丢失、被破坏或包含计算机病毒等不安全情况。
********************************************************************************************************************************

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2018-02-13 05:27:32 Re: BUG #15061: Cannot use TEMP TABLE ON COMMIT DROP in extension
Previous Message Tom Lane 2018-02-13 02:29:33 Re: response time is very long in PG9.5.5 using psql or jdbc