Обсуждение: [ADMIN] Req. for some help with temp tables

Поиск
Список
Период
Сортировка

[ADMIN] Req. for some help with temp tables

От
"Tharmarajah, Sam"
Дата:

Hi

 

We have a vendor delivered application running on postgres 9.1. It is creating temp tables per session. Currently the application group is reporting the that they are seeing a very slow response on the application in production and in the logs we see tons and tons of autovaccum of oraphan temp table cleanups. So we have the following questions.

 

1.       How can we mitigate this performance degradation from the database side. The most interesting part is the application vendor doesn’t seem to response in a timely manner. Also this application is connecting through glassfish.

2.       What can we tune in the database to get this performance improve?

3.       Every time the auto vacuum runs it pegs 1 CPU to 100%.

 

Please bear with these novice questions as I am very new to postgres…

 

Thanx,

Sam

Re: [ADMIN] Req. for some help with temp tables

От
Feike Steenbergen
Дата:
First of all, 9.1 is EOL. That, and the fact that there are huge performance
gains in every release since then, it is advisable to upgrade.

On 23 January 2017 at 17:19, Tharmarajah, Sam <sambavan.tharmarajah@usask.ca>
wrote:
> [...] seeing a very slow response on the application in production and in the
> logs we see tons and tons of autovaccum of oraphan temp table cleanups

Could you share some of these log entries?

> 1.       How can we mitigate this performance degradation from the database
> side.  2.       What can we tune in the database to get this performance
> improve?  3.       Every time the auto vacuum runs it pegs 1 CPU to 100%.

Are you using actual temporary tables or our you using permanent tables
temporarily?  I'm asking, because according to the docs[1]: Temporary tables
cannot be accessed by autovacuum.  So that probably means you're using
permanent tables temporarily.
- how are these tables created?
- when are they dropped?
- how are they emptied? (DELETE or TRUNCATE?)

[1]https://www.postgresql.org/docs/9.1/static/routine-vacuuming.html#AUTOVACUUM

regards,

Feike