Re: Recovery from Transaction wraparound failure

From: Ganesh Kannan <ganesh(dot)kannan(at)weatheranalytics(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Recovery from Transaction wraparound failure
Date: 2017-02-08 20:56:11
Message-ID: DM5PR07MB27477C8095FCD878B763C3D786420@DM5PR07MB2747.namprd07.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Tom,

Thank you much for the timely help. I continued executing vacuum for the select tables in single user mode (ignoring warning) and the database is back to accepting writes.

Thanks

Ganesh

________________________________
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Sent: Wednesday, February 8, 2017 11:13:47 AM
To: Ganesh Kannan
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Recovery from Transaction wraparound failure

Ganesh Kannan <ganesh(dot)kannan(at)weatheranalytics(dot)com> writes:
> 1) After reading the documentation, I thought I could try to vacuum
> those 20 tables that were never vacuumed individually ( with relfrozenid
> more than 2 billion) in single-user mode, but it is not working (error
> copied below).

That is not an error, it's just a warning:

> backend> vacuum freeze schema.wd_p51_y2015;
> 2017-02-07 23:25:15 EST [54045]: [8-1] user=,db=,app=,client= WARNING: database "db1" must be vacuumed within 999999 transactions
> 2017-02-07 23:25:15 EST [54045]: [9-1] user=,db=,app=,client= HINT: To avoid a database shutdown, execute a database-wide VACUUM in that database.

It's telling you that you haven't finished fixing the problem, not that
this command didn't do anything.

> Is there a way to do vacuum of individual tables in
> single-user mode?

You're doing it. I don't think you really need the "freeze" modifier
though, and that may be forcing more I/O than is needed to get out of
trouble.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Duffy 2017-02-09 02:33:30 Change ownership of a database
Previous Message Lazaro Garcia 2017-02-08 16:27:42 Why pgpool TPS is lowest versus postgresql direct connections?