Re: Vacuumdb on a table - Mailing list pgsql-admin

From Keith
Subject Re: Vacuumdb on a table
Date
Msg-id CAHw75vvYL0tFnRdpGVgqmWM=h7n49mYSjBpXW56emtCJ26tzLA@mail.gmail.com
Whole thread Raw
In response to Vacuumdb on a table  (Murthy Nunna <mnunna@fnal.gov>)
Responses Re: Vacuumdb on a table
List pgsql-admin


On Wed, Oct 18, 2023 at 4:06 PM Murthy Nunna <mnunna@fnal.gov> wrote:

Hi,

 

The first table in the following query resulted in age(c.relfrozenxid) = 148795396. But when I manually run vacuumdb command (vacuumdb -d db1 -t tab1) on that table it is not lowering the relfrozenxid. There is no indication in the pglog that vacuumdb failed.

 

SELECT c.oid::regclass

    , age(c.relfrozenxid)

    , pg_size_pretty(pg_total_relation_size(c.oid))

FROM pg_class c

JOIN pg_namespace n on c.relnamespace = n.oid

WHERE relkind IN ('r', 't', 'm')

AND n.nspname NOT IN ('pg_toast')

ORDER BY 2 DESC ;

 

I am wondering why vacuumdb is unable to lower relfrozenxid on this table? It seems to work on other tables though.

 

Thank you!



Check pg_stat_activity or pg_locks to see if there are any open transactions or locks on the table in question.

Keith

pgsql-admin by date:

Previous
From: Rajesh Kumar
Date:
Subject: Re: Table health
Next
From: Rajesh Kumar
Date:
Subject: Cluster creation in Openshift container