From: Richard Huxton <dev@archonet.com>
To: Andreas Joseph Krogh <andreak@officenet.no>
Cc: pgsql-sql@postgresql.org
Subject: Re: row-attribute in EXPLAIN-output doesn't match count(*)
Date: Thu, 14 Apr 2005 18:12:54 +0100
Message-ID: <425EA496.2030501@archonet.com> (raw)
In-Reply-To: <200504141838.14705.andreak@officenet.no>
References: <200504141838.14705.andreak@officenet.no>
Andreas Joseph Krogh wrote:
> Hi everybody, I have table which inly has 298 rows in it, but EXPLAIN ANALYZE
> shows that PG thinks it has as much as 160057 rows AFAICT from the
> EXPLAIN-output.
>
> I've just run a "VACUUM FULL VERBOSE" on the whole database, which gave the
> following output on the relevant table(onp_web_index):
>
> INFO: vacuuming "public.onp_web_index"
> INFO: "onp_web_index": found 0 removable, 160057 nonremovable row versions in
> 206940 pages
> DETAIL: 159759 dead row versions cannot be removed yet.
A long-lived transaction can still see these row versions, so vacuum
can't delete them. Until that transaction is committed/rolled back PG
has to keep the old versions of those rows available, because it might
be able to see them.
So - do you have an application/client that has had a single transaction
open for a long time. A very long time unless you update this table a lot.
--
Richard Huxton
Archonet Ltd
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: dev@archonet.com, andreak@officenet.no
Subject: Re: row-attribute in EXPLAIN-output doesn't match count(*)
In-Reply-To: <425EA496.2030501@archonet.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