pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nick Fankhauser <nickf@doxpop.com>
To: pgsql-admin@postgresql.org
Subject: Specific questions about wraparound and vacuum
Date: Wed, 8 Aug 2007 12:07:14 -0400
Message-ID: <bb2fe60f0708080907x1d8aa6dct5aa3cb1e1ba15897@mail.gmail.com> (raw)

Hi-

I have a few specific questions about wraparound that I'm not finding
answers for in the Docs or list archives. We're a few versions behind
(sorry!) at 7.4.7. Our database is large (100 GB), with most of the rows
concentrated in 5 tables, the largest containing rows.

1) Do we need to do a *full* vacuum or just a "lazy" vacuum to take care of
the xid wraparound issues? The documentation at
http://www.postgresql.org/docs/7.4/interactive/maintenance.html#VACUUM-FOR-WRAPAROUNDimplies
that a regular vacuum is all that is needed but is not explicit
about it. We vacuum nightly, but due to availability requirements almost
never do a full vacuum.

2) If a regular (non-full) vacuum will not reset the XID. Will a
dump/restore take care of wraparound? We have done this in the past for
space reclamation because we seem to be able to dump/restore more quickly
than we can do a full vacuum.

3) How can we tell if our attempts to take care of wraparound have worked? I
found a note that this select should tell me if we're in trouble:

SELECT datname, age(datfrozenxid) FROM pg_database;

But after a vaccum of both our prod and the template1 database, I get this
result:

   datname  |    age
-----------+------------
prod      | 1074324475
template1 | 1073742599
template0 |  363178963
(3 rows)

view thread (11+ messages)  latest in thread

Message-ID: <bb2fe60f0708080907x1d8aa6dct5aa3cb1e1ba15897@mail.gmail.com>
Permalink:  ../bb2fe60f0708080907x1d8aa6dct5aa3cb1e1ba15897@mail.gmail.com/
Also on:    postgresql.org/message-id/bb2fe60f0708080907x1d8aa6dct5aa3cb1e1ba15897@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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: nickf@doxpop.com
  Subject: Re: Specific questions about wraparound and vacuum
  In-Reply-To: <bb2fe60f0708080907x1d8aa6dct5aa3cb1e1ba15897@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