Re: ERROR: MultiXactId 3268957 has not been created yet -- apparent wraparound after missused pg_resetxlogs

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: RADIX Alain - externe <alain-externe(dot)radix(at)edf(dot)fr>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ERROR: MultiXactId 3268957 has not been created yet -- apparent wraparound after missused pg_resetxlogs
Date: 2017-10-16 16:39:18
Message-ID: 20171016163918.4ud3annw5oeb6sod@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

RADIX Alain - externe wrote:

> I'm facing a problem with a PostgreSQL 9.6.2 reporting this error when selecting a table
> ERROR: MultiXactId 3268957 has not been created yet -- apparent wraparound
>
> The root cause is not a Postgres bug but a buggy person that used pg_resetxlogs obviously without reading or understanding the documentation.
>
> I'm trying to extract data from the db to create a new one ;-)
> But pg_dump logically end with the same error.
>
> I've seen the row with t_max = 3268957 page_inspect, I might use it to extract row from the page, but this will not be quite easy.

I'm not quite sure what it is that you want, other than to chastise the
person who deleted pg_wal. Maybe pageinspect's heap_page_item_attrs()
function, new in 9.6, can help you extract data from tuples with
"corrupt" xmax. Or perhaps it is easier to return the pg_control
multixact counters to the original values?

> Is there a way to change the t_max to a value that won't fire the error, with this row.

You could try setting it to 0, and/or set/reset the xmax flags in
infomask.

> Hopefully, this is not a production database :-D but the user want to
> start qualification of the new application version today .. no luck
> for him.

Hurray. The other good news is that one of your engineers is now an
experienced person.

> At least, there is something to learn, renaming pg_xlog to pg_wal won't stop everybody :-/

Yay?

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2017-10-16 17:02:50 Re: Determine state of cluster (HA)
Previous Message Robert Haas 2017-10-16 16:28:22 Re: Extended statistics is not working on Vars hidden under a RelabelType