Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f46sY-0006xs-78 for pgsql-general@arkaria.postgresql.org; Thu, 05 Apr 2018 15:32:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f46sW-0001fj-JV for pgsql-general@arkaria.postgresql.org; Thu, 05 Apr 2018 15:32:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f46sW-0001fZ-Bd for pgsql-general@lists.postgresql.org; Thu, 05 Apr 2018 15:32:44 +0000 Received: from [195.159.176.226] (helo=blaine.gmane.org) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f46sO-0001Ir-Tt for pgsql-general@postgresql.org; Thu, 05 Apr 2018 15:32:43 +0000 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1f46qH-0008Tu-N4 for pgsql-general@postgresql.org; Thu, 05 Apr 2018 17:30:25 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-general@postgresql.org From: adsj@novozymes.com (Adam =?utf-8?Q?Sj=C3=B8gren?=) Subject: Re: ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100 Date: Thu, 05 Apr 2018 17:32:27 +0200 Organization: koldfront - analysis & revolution, Copenhagen, Denmark Lines: 69 Message-ID: <87bmexekj8.fsf@tullinup.koldfront.dk> References: <7pefuv53dl.fsf@novozymes.com> <871siqcdjh.fsf@tullinup.koldfront.dk> <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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@blaine.gmane.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) OpenPGP: id=476630590A231909B0A0961A49D0746121BDE416; url=https://asjo.koldfront.dk/gpg.asc X-Face: )qY&CseJ?.:=8F#^~GcSA?F=9eu'{KAFfL1C3/A&:nE?PW\i65"ba0NS)97,Q(^@xk}n4Ou rPuR#V8I(J_@~H($[ym:`K_+]*kjvW>xH5jbgLBVFGXY:(#4P>zVBklLbdL&XxL\M)%T}3S/IS9lMJ ^St'=VZBR List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Adam writes: > Here's a statement which currently gives an unexpected chunk error: > > efamroot@kat efam=# SELECT * FROM efam.sendreference WHERE id = '189909908'; > ERROR: unexpected chunk number 0 (expected 1) for toast value 1698936148 in pg_toast_10919630 > > And when I run the suggested query, I get: > > efamroot@kat efam=# select chunk_id, chunk_seq, ctid, xmin, xmax, length(chunk_data) from pg_toast.pg_toast_10919630 where chunk_id = 1698936148 order by 1,2; > chunk_id | chunk_seq | ctid | xmin | xmax | length > ------------+-----------+--------------+------------+------+-------- > 1698936148 | 0 | (52888694,2) | 1511390221 | 0 | 1996 > 1698936148 | 1 | (52888694,4) | 1511390221 | 0 | 1148 > (2 rows) More examples: efamroot@kat efam=# SELECT * FROM efam.sendreference WHERE id = '237764759'; ERROR: unexpected chunk number 0 (expected 1) for toast value 1698958350 in pg_toast_10919630 efamroot@kat efam=# select chunk_id, chunk_seq, ctid, xmin, xmax, length(chunk_data) from pg_toast.pg_toast_10919630 where chunk_id = 1698958350 order by 1,2; chunk_id | chunk_seq | ctid | xmin | xmax | length ------------+-----------+--------------+------------+------+-------- 1698958350 | 0 | (54859821,2) | 1511487270 | 0 | 1448 (1 row) And: efamroot@kat efam=# SELECT * FROM efam.sendreference WHERE id = '366275833'; ERROR: unexpected chunk number 0 (expected 1) for toast value 1698945095 in pg_toast_10919630 efamroot@kat efam=# select chunk_id, chunk_seq, ctid, xmin, xmax, length(chunk_data) from pg_toast.pg_toast_10919630 where chunk_id = 1698945095 order by 1,2; chunk_id | chunk_seq | ctid | xmin | xmax | length ------------+-----------+--------------+------------+------+-------- 1698945095 | 0 | (53706565,3) | 1511426847 | 0 | 1996 1698945095 | 1 | (53706565,6) | 1511426847 | 0 | 108 (2 rows) One more: efamroot@kat efam=# SELECT * FROM efam.sendreference WHERE id = '189909908'; ERROR: unexpected chunk number 0 (expected 1) for toast value 1698936148 in pg_toast_10919630 efamroot@kat efam=# select chunk_id, chunk_seq, ctid, xmin, xmax, length(chunk_data) from pg_toast.pg_toast_10919630 where chunk_id = 1698936148 order by 1,2; chunk_id | chunk_seq | ctid | xmin | xmax | length ------------+-----------+--------------+------------+------+-------- 1698936148 | 0 | (52888694,2) | 1511390221 | 0 | 1996 1698936148 | 1 | (52888694,4) | 1511390221 | 0 | 1148 (2 rows) And here is one from another table: efamroot@kat efam=# SELECT * FROM efam.sequence WHERE id = '235887163'; ERROR: unexpected chunk number 0 (expected 1) for toast value 1698750544 in pg_toast_10919630 efamroot@kat efam=# select chunk_id, chunk_seq, ctid, xmin, xmax, length(chunk_data) from pg_toast.pg_toast_10919630 where chunk_id = 1698750544 order by 1,2; chunk_id | chunk_seq | ctid | xmin | xmax | length ------------+-----------+--------------+------------+------+-------- 1698750544 | 0 | (39575142,3) | 1510704835 | 0 | 1996 1698750544 | 1 | (39575142,4) | 1510704835 | 0 | 716 (2 rows) Let me know what other relevant info I can provide. Best regards, Adam -- "No more than that, but very powerful all the Adam Sjøgren same; simple things are good." adsj@novozymes.com