pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guido Barosio <gbarosio@gmail.com>
To: Jaime Casanova <systemguards@gmail.com>
Cc: Szabolcs BALLA <szballa@confinsystems.com>
Cc: postgre <pgsql-admin@postgresql.org>
Subject: Re: Vacuum is needed or not?
Date: Thu, 5 Jan 2006 17:30:13 +0000
Message-ID: <f7f6b4c70601050930j453ff4f1oee20a509e4a9a300@mail.gmail.com> (raw)
In-Reply-To: <c2d9e70e0601050748j75b26a82r3c68532aa04ec4e4@mail.gmail.com>
References: <1136466721.4221.39.camel@bh>
	<c2d9e70e0601050637i4888ee80gdc25f285f18bec13@mail.gmail.com>
	<1136475086.4221.48.camel@bh>
	<c2d9e70e0601050748j75b26a82r3c68532aa04ec4e4@mail.gmail.com>

http://www.postgresql.org/docs/8.0/interactive/maintenance.html

Read all, in order to understand the following quote:

"

Since periodic VACUUM runs are needed anyway for the reasons described
earlier, it's unlikely that any table would not be vacuumed for as long as a
billion transactions. But to help administrators ensure this constraint is
met, VACUUM stores transaction ID statistics in the system table pg_database.
In particular, the datfrozenxid column of a database's pg_database row is
updated at the completion of any database-wide VACUUM operation (i.e.,
VACUUM that does not name a specific table). The value stored in this field
is the freeze cutoff XID that was used by that VACUUM command. All normal
XIDs older than this cutoff XID are guaranteed to have been replaced by
FrozenXID within that database. A convenient way to examine this information
is to execute the query

SELECT datname, age(datfrozenxid) FROM pg_database;

"

Best wishes,
Guido


On 1/5/06, Jaime Casanova <systemguards@gmail.com> wrote:
>
> On 1/5/06, Szabolcs BALLA <szballa@confinsystems.com> wrote:
> >
> >
> VACUUM is needed at least every billion transactions...
>
> execute it in a
> > script periodically... if you are in doubt if you need
> VACUUM then you need
> > it urgently, execute it right now!!!
>
> >
> > yes, and i running every weekend a full analyze, but actually i think
> it's
> > need again, but just for feel i couldn't stop the server.
> > I need evidence. (oldspice rulez ;))
> >
> > Szabek
>
> a plain VACUUM (without full) is enough in most cases... and you don't
> need to stop the server for a plain VACUUM...
>
> --
> regards,
> Jaime Casanova
> (DBA: DataBase Aniquilator ;)
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>



--
"Adopting the position that you are smarter than an automaticoptimization
algorithm is generally a good way to achieve lessperformance, not more" -
Tom Lane.

view thread (7+ messages)  latest in thread

Message-ID: <f7f6b4c70601050930j453ff4f1oee20a509e4a9a300@mail.gmail.com>
Permalink:  ../f7f6b4c70601050930j453ff4f1oee20a509e4a9a300@mail.gmail.com/
Also on:    postgresql.org/message-id/f7f6b4c70601050930j453ff4f1oee20a509e4a9a300@mail.gmail.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: gbarosio@gmail.com, systemguards@gmail.com, szballa@confinsystems.com
  Subject: Re: Vacuum is needed or not?
  In-Reply-To: <f7f6b4c70601050930j453ff4f1oee20a509e4a9a300@mail.gmail.com>
  References: <1136466721.4221.39.camel@bh> <c2d9e70e0601050637i4888ee80gdc25f285f18bec13@mail.gmail.com> <1136475086.4221.48.camel@bh> <c2d9e70e0601050748j75b26a82r3c68532aa04ec4e4@mail.gmail.com> <f7f6b4c70601050930j453ff4f1oee20a509e4a9a300@mail.gmail.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