Re: DB become enormous with continuos insert and update

From: Gabriele Bartolini <gabriele(dot)bartolini(at)2ndQuadrant(dot)it>
To: Hfe80 <federico(dot)mo(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: DB become enormous with continuos insert and update
Date: 2010-10-27 06:05:47
Message-ID: 4CC7C13B.1000402@2ndQuadrant.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Il 27/10/10 00:22, Hfe80 ha scritto:
> The problem is that updates need more space becouse datas is not overwritten
> in the same space...

As I said earlier, we need to know which PostgreSQL version you are
using. PostgreSQL 8.3 introduced Heap Only Tuples (HOT) updates. Is it
at least an 8.3 version (so 8.4 or 9.0)?

> it seems that when there is huge update db grow to create space necessary
> ...700 Mb every time and than vacuum works but only since next update! and
> db grow 700Mb more and 700 Mb more....

As John said earlier, you might want to look at the fillfactor attribute
for a table and lower it (see
http://www.postgresql.org/docs/current/static/sql-createtable.html - for
9.0) and make sure there is not a long transaction that keeps those rows
alive.

Another good place where to look and find more information is the
PostgreSQL catalog (pg_stat_user_tables table).

> It seems a bug
It is definitely not a bug, but a desired behaviour deriving from the
MVCC architecture.

Ciao,
Gabriele

--
Gabriele Bartolini - 2ndQuadrant Italia
PostgreSQL Training, Services and Support
gabriele(dot)bartolini(at)2ndQuadrant(dot)it | www.2ndQuadrant.it

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Devrim GÜNDÜZ 2010-10-27 06:37:24 Re: Is there a plugin/script for nagios that monitors pitr being up to djavascript:;ate?
Previous Message Uwe Schroeder 2010-10-27 05:27:40 Re: What is better method to backup postgresql DB.