From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tomas Vondra <tv@fuzzy.cz>
Cc: pgsql-performance@postgresql.org
Subject: Re: serious problems with vacuuming databases
Date: Sun, 09 Apr 2006 14:53:57 -0400
Message-ID: <12734.1144608837@sss.pgh.pa.us> (raw)
In-Reply-To: <443950FB.4050707@fuzzy.cz>
References: <443950FB.4050707@fuzzy.cz>
Tomas Vondra <tv@fuzzy.cz> writes:
> 1) drop, create and fill table B (aggregated data from A, C, D)
> 2) copy 'old' data from A, C and D to A_old, C_old a D_old
> 3) delete old data from A, C, D
> 4) dump data from A_old, C_old and D_old
> 5) truncate tables A, C, D
> 6) vacuum full analyze tables A, C, D, A_old, C_old and D_old
Steps 3/5/6 make no sense at all to me: why bother deleting data retail
when you are about to truncate the tables, and why bother vacuuming a
table you just truncated? Is the above *really* what you did?
> The problem is this - today, we run a scheduled VACUUM FULL ANALYZE for
> the whole database, and it runs for about 10 hours already, which is
> much more than usual (and it is still running).
Is it actually grinding the disk, or is it just blocked waiting for
someone's lock? If it's actually doing work, which table is it working
on? (You should be able to figure that out by looking in pg_locks,
or by strace'ing the process to see which files it's touching.)
regards, tom lane
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-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, tv@fuzzy.cz
Subject: Re: serious problems with vacuuming databases
In-Reply-To: <12734.1144608837@sss.pgh.pa.us>
* 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