Re: pg_subtrans directory grows over 1 GB, is there a way to control it? - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: pg_subtrans directory grows over 1 GB, is there a way to control it?
Date
Msg-id 16996.1210949071@sss.pgh.pa.us
Whole thread Raw
In response to pg_subtrans directory grows over 1 GB, is there a way to control it?  (Dennis Wang <dennis_02_2002@hotmail.com>)
List pgsql-interfaces
Dennis Wang <dennis_02_2002@hotmail.com> writes:
> I am using PostgreSQL database in a location recognition application, the files under postgresql/cluster is growing
andover a few days it become very large as below. 
 
>     /var/opt/postgresql/cluster/data  166015 Kilobytes  (the actual database data)
>     /var/opt/postgresql/cluster/sys/pg_clog 74188 Kilobytes  (transaction commit status data)
>     /var/opt/postgresql/cluster/sys/pg_subtrans   1187032 Kilobytes (transaction status data)

I think the only way pg_subtrans can get that large is if you have a
client that's been sitting holding an open transaction for a very long
time.  Take a look in pg_stat_activity.

The expected size of pg_clog varies depending on what PG version you're
using.  In recent releases you can alter autovacuum_freeze_max_age to
trade off the size of pg_clog against the frequency of forced vacuums.
        regards, tom lane


pgsql-interfaces by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pg_subtrans directory grows over 1 GB, is there a way to control it?
Next
From: clarkhorse@clarktx.com
Date:
Subject: Newbie problem with from database in C