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

Re: Pet Peeves?

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Erik Jones <ejones(at)engineyard(dot)com>
Cc: wstrzalka <wstrzalka(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Pet Peeves?
Date: 2009-02-06 23:24:22
Message-ID: (view raw or whole thread)
Lists: pgsql-general
Erik Jones escribió:

> One workaround I came up with a while back for that is to edit the stat 
> file name to be in a separate directory under global (like  
> <datadir>/global/pg_stats/pgstat.stat) and mount a ramfs there.  Of  
> course, a custom compile isn't always an option but it removed a *ton*  
> of IO on that db (had thousands upon thousands of tables).  Also, if you 
> do that you need to be sure to copy pgstat.stat to a permanent place 
> periodically unless you want to risk losing all of your stats.

Hmm, you don't really need to copy it periodically -- you need to do it
on shutdown only.  If the system crashes, the recovery code will delete
the pgstats file anyway.

Alvaro Herrera                      
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

pgsql-general by date

Next:From: Ivan Sergio BorgonovoDate: 2009-02-07 00:43:10
Subject: minimal open source e-commerce software for pg
Previous:From: Greg SmithDate: 2009-02-06 18:55:34
Subject: Re: warm database, tape device backup

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