Re: vacuuming not working?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David Esposito" <dvesposito(at)newnetco(dot)com>
Cc: "Jeffrey W(dot) Baker" <jwbaker(at)acm(dot)org>, "Postgres general mailing list" <pgsql-general(at)postgresql(dot)org>
Subject: Re: vacuuming not working?
Date: 2002-04-08 19:38:23
Message-ID: 22955.1018294703@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"David Esposito" <dvesposito(at)newnetco(dot)com> writes:
> That's why I isolated it down to a standalone example ... There is no other
> process looking at that table ... no foreign keys or other things that could
> cause those records to be "in use" ...

Whether there *is* something looking at that table is not the issue.
The issue is whether there is an open transaction old enough that if
it chose to look at the table, it would see now-deleted rows. If so,
VACUUM can't remove those rows, since it doesn't have any way to know
whether the old transaction will later choose to look.

Given your later message, I suspect there was such an open transaction
and it exited. There is not any really good way to look for this
situation, although the pg_stat_activity view (in 7.2) is better than
nothing. Perhaps in future releases, we should add columns to
pg_stat_activity that would indicate how old each backend's open
transaction is.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Esposito 2002-04-08 19:47:45 Re: vacuuming not working?
Previous Message S Dawalt 2002-04-08 19:35:35 Re: PHP, HTML Forms & PostgreSQL