Re: DB become enormous with continuos insert and update - Mailing list pgsql-general

From Gabriele Bartolini
Subject Re: DB become enormous with continuos insert and update
Date
Msg-id 4CC7C13B.1000402@2ndQuadrant.it
Whole thread Raw
In response to Re: DB become enormous with continuos insert and update  (Hfe80 <federico.mo@gmail.com>)
List 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.bartolini@2ndQuadrant.it | www.2ndQuadrant.it


pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Advice needed on application/database authentication/authorization/auditing model
Next
From: Uwe Schroeder
Date:
Subject: Re: What is better method to backup postgresql DB.