Re: Vacuum, analyze, and setting reltuples of pg_class - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Vacuum, analyze, and setting reltuples of pg_class
Date
Msg-id 14241.1165860324@sss.pgh.pa.us
Whole thread Raw
In response to Re: Vacuum, analyze, and setting reltuples of pg_class  ("Greg Sabino Mullane" <greg@turnstep.com>)
List pgsql-hackers
"Greg Sabino Mullane" <greg@turnstep.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


pgsql-hackers by date:

Previous
From: "Simon Riggs"
Date:
Subject: Re: EXPLAIN ANALYZE
Next
From: Tom Lane
Date:
Subject: Re: EXPLAIN ANALYZE