Re: ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100

From: adsj(at)novozymes(dot)com (Adam =?utf-8?Q?Sj=C3=B8gren?=)
To: pgsql-general(at)postgresql(dot)org
Subject: Re: ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100
Date: 2018-01-16 10:18:26
Message-ID: 871siqcdjh.fsf@tullinup.koldfront.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

We are seeing these "ERROR: unexpected chunk number 0 (expected 1) for
toast value 1498303849 in pg_toast_10919630" in increasing numbers again¹.

An observation is that they seem to only happen for tsvector fields.

Here is an example sequence of queries for a record (we have more than a
handful of these currently), which exhibits the problem.

First we get two other fields, 'sequence' is large enough to be toast'ed:

2018-01-16 08:51:17.362 efam=# select id,sequence from efam.sequence where id = 164504550;
Time: 1.150 ms

No problem.

Then we also fetch the tsvector field:

2018-01-16 08:51:27.773 efam=# select id,sequence,fts from efam.sequence where id = 164504550;
ERROR: unexpected chunk number 0 (expected 1) for toast value 1498303849 in pg_toast_10919630
Time: 0.912 ms

And we get the error.

Getting the id and the tsvector:

2018-01-16 08:51:34.174 efam=# select id,fts from efam.sequence where id = 164504550;
ERROR: unexpected chunk number 0 (expected 1) for toast value 1498303849 in pg_toast_10919630
Time: 6.138 ms

gives the error.

Just getting the tsvector:

2018-01-16 08:51:40.066 efam=# select fts from efam.sequence where id = 164504550;
ERROR: unexpected chunk number 0 (expected 1) for toast value 1498303849 in pg_toast_10919630
Time: 1.805 ms

Gives the error.

Field definitions:

id | integer |
sequence | text |
fts | tsvector |

Maybe the observation that this only happens (for us) on tsvector rings
a bell for someone?

Best regards,

Adam

¹ As reported back in June, 2017, starting here:
https://www.postgresql.org/message-id/7pefuv53dl.fsf%40novozymes.com
(I have to admit I never got around to trying to revert the commit
Alvaro Herrera suggested we try without
(https://www.postgresql.org/message-id/20170611033840.hruqadsk47qcdrqb%40alvherre.pgsql))

--
"No more than that, but very powerful all the Adam Sjøgren
same; simple things are good." adsj(at)novozymes(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Abhra Kar 2018-01-16 11:36:01 missing FROM-clause entry for table bbbb
Previous Message Ahmed, Nawaz 2018-01-16 07:56:20 RE: Moving from pgFouine to pgBadger Issue with Total query duration metric