From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Rural Hunter <ruralhunter(at)gmail(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: wrong database name in error message? |
Date: | 2013-09-14 04:55:19 |
Message-ID: | 20130914045519.GD5033@eldon.alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Rural Hunter escribió:
> I'm on 9.2.4 and I have several databases on the instance say db1,
> db2, db2 etc. Today I got this error message on connection of any
> of the databases:
> ERROR: database is not accepting commands to avoid wraparound data
> loss in database "db1"
> Suggestion:Stop the postmaster and use a standalone backend to
> vacuum that database.
>
> The error messages says problem is on db1 when I connected to any database. But after I did vacuum full on some other databases such as db2, db2, but not db1, the problem disappeared.
> Was that just a wrong database name in the error message?
The ultimate source of truth here are the pg_class and pg_database
catalogs (pg_class for each database stores the age of every table in
that database; pg_database stores the minimum of such values in each
database). The database name you see in the error messages is stored in
pg_control (actually it's the OID that's stored not the name), but
vacuuming other databases might have updated the pg_control info because
of updated calculations from the shared catalog.
I don't know how to explain the discrepancy other than concurrent
processing by autovacuum, though. Perhaps autovacuum, in the last few
Xids you had left, processed that database, but the field in pg_control
didn't get updated until after you processed the other databases? Not
sure about this. But it's past my bed time here, so no further
speculation from me.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Rural Hunter | 2013-09-14 05:27:05 | Re: wrong database name in error message? |
Previous Message | Rural Hunter | 2013-09-14 03:53:41 | Re: wrong database name in error message? |