Re: Req. for some help with temp tables

From: Feike Steenbergen <feikesteenbergen(at)gmail(dot)com>
To: "Tharmarajah, Sam" <sambavan(dot)tharmarajah(at)usask(dot)ca>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Req. for some help with temp tables
Date: 2017-02-14 14:28:49
Message-ID: CAK_s-G1UMakZvgJx_noVYZHiqN3wdAZ200hd4B2e1ZDeb+=sUw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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(dot)tharmarajah(at)usask(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Alvaro Herrera 2017-02-14 14:52:55 Re: (auto) vacuum mysterious
Previous Message Feike Steenbergen 2017-02-14 13:54:40 Re: PostgreSQL on Docker