pg_toast_xxx table's file leak (grows indefinitely) - Mailing list pgsql-bugs

From pgsql-bugs@postgresql.org
Subject pg_toast_xxx table's file leak (grows indefinitely)
Date
Msg-id 200012271048.eBRAmgi02692@hub.org
Whole thread Raw
List pgsql-bugs
Ronald Tschalär (ronald@innovation.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:

Previous
From: Dirk Lutzebaeck
Date:
Subject: Re: Backend crashes in 7.0.3
Next
From: pgsql-bugs@postgresql.org
Date:
Subject: Conversion errors for datetime fields