pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <smarlowe@g2switchworks.com>
To: Sriram Dandapani <sdandapani@counterpane.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@postgresql.org
Subject: Re: transactoin id wraparound problem
Date: Wed, 06 Sep 2006 16:18:16 -0500
Message-ID: <1157577495.20424.29.camel@state.g2switchworks.com> (raw)
In-Reply-To: <6992E470F12A444BB787B5C937B9D4DF05ABC8C7@ca-mail1.cis.local>
References: <6992E470F12A444BB787B5C937B9D4DF05ABC8C7@ca-mail1.cis.local>

On Wed, 2006-09-06 at 16:06, Sriram Dandapani wrote:
> Curious why autovacuum does not handle this problem. Here are my
> settings
> 
> max_fsm_pages = 2000000
> 
> autovacuum = on                                # enable autovacuum 
> 
> autovacuum_naptime = 300                # time between autovacuum runs,
> in 
> 
> autovacuum_vacuum_threshold = 10000     # min # of tuple updates before
>                                         # vacuum
> autovacuum_analyze_threshold = 1500     # min # of tuple updates before
>                                         # analyze
> autovacuum_vacuum_scale_factor = 0.4    # fraction of rel size before
>                                         # vacuum
> autovacuum_analyze_scale_factor = 0.2   # fraction of rel size before
>                                         # analyze
> autovacuum_vacuum_cost_delay = 100
> 
> autovacuum_vacuum_cost_limit = 1000
> 
> 
> The database has a constant rate of about 50-100G a day of data flowing
> in which gets deleted after 2 days.(this cycle keeps repeating). There
> are historical tables that grow at a rate of 2G-4G a day

The most common cause of these problems is that you have long standing
transactions that never get closed.  Look for some connection to the
database(s) (any of them) that are never committed or rolled back.  One
"idle in transaction" connection from one program can cause this
problem.

If you're doing your updates and / or deletes individually instead of in
transactional batches that will just make it worse.





view thread (27+ messages)  latest in thread

Message-ID: <1157577495.20424.29.camel@state.g2switchworks.com>
Permalink:  ../1157577495.20424.29.camel@state.g2switchworks.com/
Also on:    postgresql.org/message-id/1157577495.20424.29.camel@state.g2switchworks.com

 · 

reply

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: smarlowe@g2switchworks.com, sdandapani@counterpane.com, tgl@sss.pgh.pa.us
  Subject: Re: transactoin id wraparound problem
  In-Reply-To: <1157577495.20424.29.camel@state.g2switchworks.com>
  References: <6992E470F12A444BB787B5C937B9D4DF05ABC8C7@ca-mail1.cis.local> <1157577495.20424.29.camel@state.g2switchworks.com>

* 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