pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: adsj@novozymes.com
Cc: pgsql-general@postgresql.org
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Subject: Re: ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100
Date: Thu, 05 Apr 2018 17:04:38 -0400
Message-ID: <25544.1522962278@sss.pgh.pa.us> (raw)
In-Reply-To: <87y3i1flgn.fsf@tullinup.koldfront.dk>
References: <7pefuv53dl.fsf@novozymes.com>
	<871siqcdjh.fsf@tullinup.koldfront.dk>
	<SC1P15201MB2015B0AEF742D4D77E27D60EBCEA0@SC1P15201MB2015.LAMP152.PROD.OUTLOOK.COM>
	<87efmpllwg.fsf@tullinup.koldfront.dk>
	<20180117025021.GA39977@paquier.xyz>
	<874lnlc6ja.fsf@tullinup.koldfront.dk>
	<7632.1516209379@sss.pgh.pa.us>
	<87k1tlel41.fsf@tullinup.koldfront.dk>
	<17892.1522942621@sss.pgh.pa.us>
	<877eplej3o.fsf@tullinup.koldfront.dk>
	<87y3i1flgn.fsf@tullinup.koldfront.dk>

adsj@novozymes.com (Adam =?utf-8?Q?Sj=C3=B8gren?=) writes:
>> [... still waiting for the result, I will return with what it said
>> when the server does ...]

> It did eventually finish, with the same result:

Huh.  So what we have here, apparently, is that regular MVCC snapshots
think there is exactly one copy of the 1698936148/0 row, but TOAST fetches
think there is more than one.  This is darn odd, not least because we
never do UPDATEs in toast tables, only inserts and deletes, so there
certainly shouldn't be update chains there.

It seems like you've got some corner case wherein SnapshotToast sees a row
that isn't visible according to MVCC --- probably a row left over from
some previous cycle of life.  That is, I'm imagining the OID counter
wrapped around and we've reused a toast OID, but for some reason there's
still a row in the table with that OID.  I'm not sure offhand how we could
get into such a state.  Alvaro, does this ring any bells (remembering that
this is 9.3)?

			regards, tom lane




view thread (58+ messages)  latest in thread

Message-ID: <25544.1522962278@sss.pgh.pa.us>
Permalink:  ../25544.1522962278@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25544.1522962278@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, adsj@novozymes.com, alvherre@2ndquadrant.com
  Subject: Re: ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100
  In-Reply-To: <25544.1522962278@sss.pgh.pa.us>
  References: <7pefuv53dl.fsf@novozymes.com> <871siqcdjh.fsf@tullinup.koldfront.dk> <SC1P15201MB2015B0AEF742D4D77E27D60EBCEA0@SC1P15201MB2015.LAMP152.PROD.OUTLOOK.COM> <87efmpllwg.fsf@tullinup.koldfront.dk> <20180117025021.GA39977@paquier.xyz> <874lnlc6ja.fsf@tullinup.koldfront.dk> <7632.1516209379@sss.pgh.pa.us> <87k1tlel41.fsf@tullinup.koldfront.dk> <17892.1522942621@sss.pgh.pa.us> <877eplej3o.fsf@tullinup.koldfront.dk> <87y3i1flgn.fsf@tullinup.koldfront.dk> <25544.1522962278@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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