From: mlaks <mlaks@bellatlantic.net>
To: pgsql-admin@postgresql.org
Subject: Database growth problem
Date: Thu, 17 Jul 2003 22:32:24 -0400
Message-ID: <200307172232.24024.mlaks@bellatlantic.net> (raw)
Hi,
I have about 15 different PC's running RedHat 7.3 Linux, each running the
same database backed application (I use Postgresql 7.2.1 for the database)
on each machine.
The application essentially stores files on each of the PC's and the database
on each machine stores information relevant to the files that are stored on
that machine.
The files themselves are stored on a RAID on each PC, around 300 GB in size.
As each file is about .5MB in size, thus about 600,000 files are stored and
managed by the Postgresql database on each machine. I note that the database
is about 1GB in size on each of the machines.
I am constantly receiving new files, and as the PC's fill with files, I simply
add additonal PC to my farm of PC's.
These databases therefore never have any data deleted from the databases. I
just add files, and corresponding database entries each day, until I fill the
machine with files. I run vacuum analyze on these databases about 3 times a
day.
I also keep one machine slightly different than the others.
On this machine, as a backup to the other machines, instead of just storing
files without deleting, I use a scheme that stores new files as they come in
but also deletes the oldest files from the RAID and also deletes the
corresponding entries describing those entries from the database. I use this
machine as an element of redundancy to recent files on the other machines.
On this system, I keep the RAID about 75% full of files, and thus I imagine
that the Postgresql database should be about .75 of a GB in size. However, it
isnt! I find that it keeps growing as time goes on. Its now about 3.9GB in
size!
In fact, I just had to move the database to another partition on my system
disk, because it filled the var partition!
But I run vaccuum analyze at the same frequency as on the PC's? How is it that
deleting and saving and vacuum analyze doesnt keep it at a normal svelte <1Gb
in size?
What should I do to shrink it back down to its normal svelte shape?
Thanks,
Mitchell
This way I have redundant copies of the most recent files that were stored on
the other machines.
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-admin@postgresql.org
Cc: mlaks@bellatlantic.net
Subject: Re: Database growth problem
In-Reply-To: <200307172232.24024.mlaks@bellatlantic.net>
References: <200307172232.24024.mlaks@bellatlantic.net>
* 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