From: Mike Biamonte <mike@dbeat.com>
To: pgsql-sql@postgresql.org
Subject: delete -> copy in -> WAL problem..?
Date: Wed, 20 Mar 2002 17:44:16 -0500
Message-ID: <NDBBIGPEELKJEKFJKMMGGEJKMHAA.mike@dbeat.com> (raw)
Could use some insight on this one...
We have TWO machines running postgres: one is for
"real-time" data (registrations, order taking, sessions)
and the other is for "non real time" data (content
management, reporting, etc.).
The databases are identical - all 60 tables. The application
knows which one to use when. Nightly, we run a cron that \copy's out
the 10 "real-time" tables. The data is moved to the 2nd machine
and uploaded like this:
delete from [table];
copy [table] from [table].txt
.. etc.
This has worked well for us - the reporting database
can crunch away on all kinds of reports all day without
affecting the site.
Recently, I've noticed that, during this "copy in" process
(and the subsequent vacuum), the WAL files grow TREMENDOUSLY
in number - a thousand of them. What's causing this? Should
I vacuum each table separately after the delete/copy in?
Do I need to force "checkpoints"?
Thanks in advance.
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-sql@postgresql.org
Cc: mike@dbeat.com
Subject: Re: delete -> copy in -> WAL problem..?
In-Reply-To: <NDBBIGPEELKJEKFJKMMGGEJKMHAA.mike@dbeat.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