pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Nasby <jimn@enterprisedb.com>
To: garcia_josval@gva.es
Cc: pgsql-admin@postgresql.org, Jose Alarcon <alarcon_jos@gva.es>
Subject: Re: WAL configuration and REINDEX
Date: Thu, 21 Sep 2006 22:50:56 -0400
Message-ID: <8CC6FC7A-C737-4473-99E1-9860FA61D9C5@enterprisedb.com> (raw)
In-Reply-To: <45126C37.6020106@gva.es>
References: <45126C37.6020106@gva.es>

On Sep 21, 2006, at 6:40 AM, Jose Manuel Garci a Valladolid wrote:
> I have a PostgreSQL 8.1.4 server under Linux Red Hat with several  
> databases. The server is configured with WAL archiving turned on.  
> As a maintenance process, every night one cron job launches a  
> backup process to the server with
> pg_dump, then the server shuts down and starts up and do a REINDEX  
> DATABASE to all databases to keep all tables reindexed.
>
> After 30 days of no activity to the server (this is a DBA test  
> server) the amount of WAL segments is increasing at very high  
> speed. Every REINDEX process generates between 25 and 30 WAL  
> segments. With this behavior (and no activity!!) I can not maintain  
> this amount of data to performs future WAL backups and recovers.
>
> Any idea to decrease the number of WAL segments generated?
> Is possible to know when a table would be reindexed and to avoid  
> dayly REINDEX process?

I think you're running off some pretty old information.

First, you should only enable WAL archiving if you intend to use  
PITR. pg_dump and PITR are completely un-related. In fact, if you've  
never taken a base filesystem backup, all those old WAL files are  
completely useless.

Second, as long as you are vacuuming frequently enough, there's no  
reason you should ever have to REINDEX. You certainly shouldn't be  
doing it on a regular basis.
--
Jim Nasby                                    jimn@enterprisedb.com
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)


--
Jim Nasby                                    jimn@enterprisedb.com
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)





view thread (7+ messages)  latest in thread

Message-ID: <8CC6FC7A-C737-4473-99E1-9860FA61D9C5@enterprisedb.com>
Permalink:  ../8CC6FC7A-C737-4473-99E1-9860FA61D9C5@enterprisedb.com/
Also on:    postgresql.org/message-id/8CC6FC7A-C737-4473-99E1-9860FA61D9C5@enterprisedb.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: jimn@enterprisedb.com, garcia_josval@gva.es, alarcon_jos@gva.es
  Subject: Re: WAL configuration and REINDEX
  In-Reply-To: <8CC6FC7A-C737-4473-99E1-9860FA61D9C5@enterprisedb.com>
  References: <45126C37.6020106@gva.es> <8CC6FC7A-C737-4473-99E1-9860FA61D9C5@enterprisedb.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