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
Subject: Re: ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100
Date: Wed, 17 Jan 2018 12:16:19 -0500
Message-ID: <7632.1516209379@sss.pgh.pa.us> (raw)
In-Reply-To: <874lnlc6ja.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>

adsj@novozymes.com (Adam =?utf-8?Q?Sj=C3=B8gren?=) writes:
> Also, the error we are getting is now: "unexpected chunk number 2
> (expected 3) for toast value 1498303849 in pg_toast_10919630", where
> previously we've only seen "unexpected chunk number 0 (expected 1)".

> We are kind of at a loss, so any suggestions on what we could try are
> welcome.

The basic thrust of these messages is "I'm reading what should be
sequentially numbered data chunks for this toast OID, and the sequence
numbers are wrong".  Both of these instances could be explained by
duplicate toast rows (or duplicate index entries pointing at one row),
though of course that would just move to the next question of how it
got that way.  Anyway, you could move the investigation along with
some manual checking into what's in that toast table.  For instance

select chunk_id, chunk_seq, ctid, xmin, xmax, length(chunk_data)
  from pg_toast.pg_toast_10919630
  where chunk_id = 1498303849
  order by 1,2;

might be informative.  If you do see what seem to be duplicate
chunk_seq values, checking whether they're still there in a
seqscan would be good.

			regards, tom lane




view thread (58+ messages)  latest in thread

Message-ID: <7632.1516209379@sss.pgh.pa.us>
Permalink:  ../7632.1516209379@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7632.1516209379@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
  Subject: Re: ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100
  In-Reply-To: <7632.1516209379@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>

* 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