From: Oleg Bartunov <oleg@sai.msu.su>
To: Michael Green <michael.green@gbst.com>
Cc: 'pgsql-sql@postgresql.org' <pgsql-sql@postgreSQL.org>
Subject: Re: [SQL] Postgres Table grows very quickly?
Date: Tue, 14 Sep 1999 08:49:46 +0400 (MSD)
Message-ID: <Pine.GSO.3.96.SK.990914084405.425O-100000@ra> (raw)
In-Reply-To: <E77224BE9812D11187CC0000F806392402525752@aquarius.bne.star.com.au>
I also had this problem - I use pastgres as a backend for counting
of Web hits - not insert but update as in your case.
Postgres historicallydoing update as insert new row and marking old one
to be deleted in next vacuum, Tha's why database grows while only update.
But also, index file grow infinitely. I do vacuum of my table in cron job -
this truncate table size but stock 6.5.1 doens't truncates index file !
Vidim Mikheev fixed this problem by implementing re-use of index file in
vacuum analyze so index file still grows but not so quickly. I think it's
a hack but this works. Full solution would be implemeting update as
an update but I don't know if this in postgres TODO list.
Wait for 6.5.2 (it will be available rather soon)
Regards,
Oleg
On Tue, 14 Sep 1999, Michael Green wrote:
> Date: Tue, 14 Sep 1999 09:35:41 +1000
> From: Michael Green <michael.green@gbst.com>
> To: "'pgsql-sql@postgresql.org'" <pgsql-sql@postgreSQL.org>
> Subject: [SQL] Postgres Table grows very quickly?
>
> I have a postgres database that I use to keep stats on my routers. I have a
> separate table for each router and another called routerinfo where I keep
> model information and the time and date each of the seperate router tables
> have been updated.
>
> Routerinfo has 16 rows (for 16 routers) it gets updated every five minutes
> with the last date and time each of the other tables have been updated. I
> use a standard sql update statement. eg:
>
> UPDATE routerinfo SET lastdate = '09-14-1999', lasttime = '09:00' WHERE
> linkid = 'Sydney';
>
> Routerinfo is 8k after the initial update, from then on it grows 8k for
> every update. I never do an insert and it never grows beyond 16 rows. It
> seems as if the table is keeping a history of all updates, but timetravel is
> disabled in the current release of postgres, so that can't be it. If anybody
> has any idea of how I can stop this, please let me know
>
> Thank you.
>
>
> Michael Green
> Senior Systems Engineer
> Communications Systems
> Global Banking & Securities Transactions
> http://www.gbst.com.au
> GBST is a trademark of Star Systems Pty Ltd
>
>
>
> ************
>
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: oleg@sai.msu.su, michael.green@gbst.com
Subject: Re: [SQL] Postgres Table grows very quickly?
In-Reply-To: <Pine.GSO.3.96.SK.990914084405.425O-100000@ra>
References: <E77224BE9812D11187CC0000F806392402525752@aquarius.bne.star.com.au> <Pine.GSO.3.96.SK.990914084405.425O-100000@ra>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox