Re: Meaning of vacuum output - Mailing list pgsql-general

From Tom Lane
Subject Re: Meaning of vacuum output
Date
Msg-id 11579.1011205649@sss.pgh.pa.us
Whole thread Raw
In response to Re: Meaning of vacuum output  ("Jeffrey W. Baker" <jwbaker@acm.org>)
List pgsql-general
"Jeffrey W. Baker" <jwbaker@acm.org> writes:
> I shut down all connections, and vacuum has a different output:

> NOTICE:  Pages 33639: Changed 226, Empty 0; Tup 128819: Vac 2840812,
> Keep 0, UnUsed 96275.
>         Total CPU 14.29s/28.69u sec elapsed 233.02 sec.

Ah-hah, you did have open transactions.

> So I conclude from these two data points that Keep means tuples that are
> still visible to a transaction, Vac means tuples that are not visible to
> any transaction.  But, what is UnUsed?

Looking at the code:

Tup        # tuples remaining after vacuum
Vac        # tuples removed by vacuum
Keep        # dead tuples kept because some xact can still see 'em
Unused        # unused item pointers

"Keep" is included in the "Tup" total.

The unused item pointers may get recycled later; it looks like that
hasn't been determined yet at the point where these stats are printed.

            regards, tom lane

pgsql-general by date:

Previous
From: "Jeffrey W. Baker"
Date:
Subject: Re: Meaning of vacuum output
Next
From: Henrik Steffen
Date:
Subject: Re: PQsendQuery: Query is too long