Skip site navigation (1) Skip section navigation (2)

pg_toast_xxx table's file leak (grows indefinitely)

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: pg_toast_xxx table's file leak (grows indefinitely)
Date: 2000-12-27 10:48:42
Message-ID: 200012271048.eBRAmgi02692@hub.org (view raw or flat)
Thread:
Lists: pgsql-bugs
Ronald Tschalr (ronald(at)innovation(dot)ch) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
pg_toast_xxx table's file leak (grows indefinitely)

Long Description
I'm using the CVS snapshot from Dec 26 2000 on
Linux 2.2.24/glibc-2.1.3.

I have a table in which frequent inserts and deletes of rows are made
(the number of rows stays roughly constant), and most rows are around
15K and therefore spill into pg_toast_xxx. Unfortunately, while the
main table's file size stays stable, the associated toast-table's file
grows indefinitely. This can be easily reproduced with a simple
program that just inserts 1 row and then deletes it again, over and
over. Note that a "select * from pg_toast_xxx" correctly only shows
the number of rows around - just the associated file's size keeps
growing with every insert even if that row is immediately deleted
again. This leads to files of 100's of MB in a few hours for a table
that never has more than 4 entries, each of which are less than 20K.

Note that a vacuum will clean up the file, but it seems that it 
shouldn't be necessary to have to run that every hour.


Sample Code
test=# create table toast_test (index int4, data bytea);
test=# insert into toast_test values(0, '....<20K of data>...');
test=# delete from toast_test where index = 0;

Now repeat last two commands over and over.

No file was uploaded with this report


pgsql-bugs by date

Next:From: Manuel GELEDate: 2000-12-28 08:28:11
Subject: postgresql with opennm-0.5.0
Previous:From: Dirk LutzebaeckDate: 2000-12-27 09:54:13
Subject: Re: Backend crashes in 7.0.3

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group