Re: Vacuum, analyze, and setting reltuples of pg_class

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Vacuum, analyze, and setting reltuples of pg_class
Date: 2006-12-11 18:05:24
Message-ID: 14241.1165860324@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Greg Sabino Mullane" <greg(at)turnstep(dot)com> writes:
> Bleh. Isn't that what a plain analyze would encourage then? Should analyze
> be considering the dead rows somehow as well?

Very possibly, at least for counting purposes (it mustn't try to analyze
the content of such rows, since they could be incompatible with the
table's current rowtype).

> Still, why would an open transaction elsewhere
> block other databases / other tables for a vacuum full?

The tracking of global xmin isn't specific enough to distinguish which
database a transaction is in. VACUUM does ignore the xmins of xacts in
other databases, but unfortunately the advertised xmin of another xact
in our *own* database will still include them.

There's been some discussion of advertising both a global and local xmin
in the PGPROC array, but this would impose extra complexity on every
single transaction start, and it's not clear that the benefit is worth that.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-12-11 18:18:27 Re: EXPLAIN ANALYZE
Previous Message Simon Riggs 2006-12-11 18:01:59 Re: EXPLAIN ANALYZE