pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #14195: "MultiXactId XXXXXX has not been created yet -- apparent wraparound" after upgrade from 9.2
4+ messages / 3 participants
[nested] [flat]

* BUG #14195: "MultiXactId XXXXXX has not been created yet -- apparent wraparound" after upgrade from 9.2
@ 2016-06-15 20:38 sean.hope@eroad.com
  2016-06-15 23:17 ` Re: BUG #14195: "MultiXactId XXXXXX has not been created yet -- apparent wraparound" after upgrade from 9.2 Andrew Gierth <andrew@tao11.riddles.org.uk>
  2016-06-24 22:59 ` Re: BUG #14195: "MultiXactId XXXXXX has not been created yet -- apparent wraparound" after upgrade from 9.2 Alvaro Herrera <alvherre@2ndquadrant.com>
  0 siblings, 2 replies; 4+ messages in thread

From: sean.hope@eroad.com @ 2016-06-15 20:38 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      14195
Logged by:          Sean Hope
Email address:      sean.hope@eroad.com
PostgreSQL version: 9.4.7
Operating system:   Ubuntu 12.04 LTS
Description:        

Hi,

We're having issues with 'MultiXactId xxxxxxxxx has not been created yet --
apparent wraparound' log messages upon table vacuums. The vacuums are
cancelled by the system after this message is issued.

These messages have only been seen since upgrading from 9.2.x to 9.4.7 via
pg_upgrade about a month ago. This is a large / high transaction rate (1120
tps) database. We are unable to vacuum the affected tables (5 of them)
currently due to this issue.

Any help most welcome.

Regards,
Sean


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #14195: "MultiXactId XXXXXX has not been created yet -- apparent wraparound" after upgrade from 9.2
  2016-06-15 20:38 BUG #14195: "MultiXactId XXXXXX has not been created yet -- apparent wraparound" after upgrade from 9.2 sean.hope@eroad.com
@ 2016-06-15 23:17 ` Andrew Gierth <andrew@tao11.riddles.org.uk>
  2016-06-15 23:36   ` Re: BUG #14195: "MultiXactId XXXXXX has not been created yet -- apparent wraparound" after upgrade from 9.2 Alvaro Herrera <alvherre@2ndquadrant.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Andrew Gierth @ 2016-06-15 23:17 UTC (permalink / raw)
  To: sean.hope@eroad.com; pgsql-bugs

>>>>> "sean" == sean hope <sean.hope@eroad.com> writes:

 sean> The following bug has been logged on the website:
 sean> Bug reference:      14195
 sean> Logged by:          Sean Hope
 sean> Email address:      sean.hope@eroad.com
 sean> PostgreSQL version: 9.4.7
 sean> Operating system:   Ubuntu 12.04 LTS
 sean> Description:        

 sean> Hi,

 sean> We're having issues with 'MultiXactId xxxxxxxxx has not been
 sean> created yet -- apparent wraparound' log messages upon table
 sean> vacuums. The vacuums are cancelled by the system after this
 sean> message is issued.

 sean> These messages have only been seen since upgrading from 9.2.x to
 sean> 9.4.7 via pg_upgrade about a month ago. This is a large / high
 sean> transaction rate (1120 tps) database. We are unable to vacuum the
 sean> affected tables (5 of them) currently due to this issue.

This one came up on the IRC channel and I did some analysis there.

What it seems to boil down to is that, faced with a tuple with a
pre-upgrade mxid, we get this call path:

vacuum calls heap_prepare_freeze_tuple

heap_prepare_freeze_tuple calls FreezeMultiXactId
 (because HEAP_XMAX_IS_MULTI)

FreezeMultiXactId checks if the mxid is older than the cutoff, but
because this is a pre-upgrade mxid it can be literally anything, and in
this case it's in the future not the past, so that check is skipped

FreezeMultiXactId calls GetMultiXactIdMembers with allow_old=true

GetMultiXactIdMembers checks for wraparound, but while it downgrades the
error to DEBUG1 if allow_old is true and the mxid is in the past, it
unconditionally errors if the mxid is in the future.



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #14195: "MultiXactId XXXXXX has not been created yet -- apparent wraparound" after upgrade from 9.2
  2016-06-15 20:38 BUG #14195: "MultiXactId XXXXXX has not been created yet -- apparent wraparound" after upgrade from 9.2 sean.hope@eroad.com
  2016-06-15 23:17 ` Re: BUG #14195: "MultiXactId XXXXXX has not been created yet -- apparent wraparound" after upgrade from 9.2 Andrew Gierth <andrew@tao11.riddles.org.uk>
@ 2016-06-15 23:36   ` Alvaro Herrera <alvherre@2ndquadrant.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Alvaro Herrera @ 2016-06-15 23:36 UTC (permalink / raw)
  To: Andrew Gierth <andrew@tao11.riddles.org.uk>; +Cc: sean.hope@eroad.com; pgsql-bugs

Andrew Gierth wrote:

> This one came up on the IRC channel and I did some analysis there.
> 
> What it seems to boil down to is that, faced with a tuple with a
> pre-upgrade mxid, we get this call path:
> 
> vacuum calls heap_prepare_freeze_tuple
> 
> heap_prepare_freeze_tuple calls FreezeMultiXactId
>  (because HEAP_XMAX_IS_MULTI)
> 
> FreezeMultiXactId checks if the mxid is older than the cutoff, but
> because this is a pre-upgrade mxid it can be literally anything, and in
> this case it's in the future not the past, so that check is skipped
> 
> FreezeMultiXactId calls GetMultiXactIdMembers with allow_old=true
> 
> GetMultiXactIdMembers checks for wraparound, but while it downgrades the
> error to DEBUG1 if allow_old is true and the mxid is in the past, it
> unconditionally errors if the mxid is in the future.

I was in the middle of writing up this in another thread, and your
analysis in spot on.

https://www.postgresql.org/message-id/20160615233427.GA18976@alvherre.pgsql

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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #14195: "MultiXactId XXXXXX has not been created yet -- apparent wraparound" after upgrade from 9.2
  2016-06-15 20:38 BUG #14195: "MultiXactId XXXXXX has not been created yet -- apparent wraparound" after upgrade from 9.2 sean.hope@eroad.com
@ 2016-06-24 22:59 ` Alvaro Herrera <alvherre@2ndquadrant.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Alvaro Herrera @ 2016-06-24 22:59 UTC (permalink / raw)
  To: sean.hope@eroad.com; +Cc: pgsql-bugs

sean.hope@eroad.com wrote:

> Hi,
> 
> We're having issues with 'MultiXactId xxxxxxxxx has not been created yet --
> apparent wraparound' log messages upon table vacuums. The vacuums are
> cancelled by the system after this message is issued.
> 
> These messages have only been seen since upgrading from 9.2.x to 9.4.7 via
> pg_upgrade about a month ago. This is a large / high transaction rate (1120
> tps) database. We are unable to vacuum the affected tables (5 of them)
> currently due to this issue.

This is fixed now, finally.
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=61b24fef89a9f7e381e6d83029b63e062...
The other thread I linked to earlier has more discussion.

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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2016-06-24 22:59 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-06-15 20:38 BUG #14195: "MultiXactId XXXXXX has not been created yet -- apparent wraparound" after upgrade from 9.2 sean.hope@eroad.com
2016-06-15 23:17 ` Andrew Gierth <andrew@tao11.riddles.org.uk>
2016-06-15 23:36   ` Alvaro Herrera <alvherre@2ndquadrant.com>
2016-06-24 22:59 ` Alvaro Herrera <alvherre@2ndquadrant.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox