pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Berg <christoph.berg@credativ.de>
To: Harry Ambrose <harry.ambrose@gmail.com>
Cc: Scott Marlowe <scott.marlowe@gmail.com>
Cc: adsj@novozymes.com
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100
Date: Wed, 30 Aug 2017 13:17:30 +0200
Message-ID: <20170830111730.ma2wyxwqrvssbdbq@msg.df7cb.de> (raw)
In-Reply-To: <CAK4Knu86q98fWNzYntsZk1uGca6F129wLShmrkzyb2EZkSMDWQ@mail.gmail.com>
References: <20170611033840.hruqadsk47qcdrqb@alvherre.pgsql>
	<7pfuf5ogho.fsf@novozymes.com>
	<7py3sll8rf.fsf_-_@novozymes.com>
	<7pvalxvsco.fsf@novozymes.com>
	<CAOR=d=3mZRihFjjnPxXae2RXh8OoVPC3RA3=4kt=8gLe4_i76Q@mail.gmail.com>
	<CAK4Knu86q98fWNzYntsZk1uGca6F129wLShmrkzyb2EZkSMDWQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>

Re: Harry Ambrose 2017-08-25 <CAK4Knu86q98fWNzYntsZk1uGca6F129wLShmrkzyb2EZkSMDWQ@mail.gmail.com>
> Hi All,
> 
> Sorry to open this can of worms again. However, we are still struggling
> with this issue across quite a large amount of our estate.

Hi,

we've just seen exactly this error on a customer database running
9.5.3 (postgresql95.x86_64 9.5.3-2PGDG.rhel6). Luckily just one tuple
was affected.

Symptoms were:
# select text from k... where id = 719764749;
ERROR:  unexpected chunk number 0 (expected 1) for toast value 3347468184 in pg_toast_922511637
The toast table itself was perfectly ok, with a single chunk:
# select * from pg_toast.pg_toast_922511637 where chunk_id = 3347468184;
chunk_id   | 3347468184
chunk_seq  | 0
chunk_data | ...valid text string... (with bytea_output = 'escape')

Updating or deleting the field/row didn't work:
# update k... set text = '...same text as above...' where id = 719764749;
ERROR:  XX000: tuple concurrently updated
ORT:  simple_heap_delete, heapam.c:3171

# delete from k... where id = 719764749;
ERROR:  XX000: tuple concurrently updated
ORT:  simple_heap_delete, heapam.c:3171

The problem persisted over the last two weeks (eventually noticed by
pg_dump starting to fail between August 15th and 18th). The server was
started on July 26th.

Besides the ERRORing statements above, I didn't actively resolve it,
suddenly SELECTing the original row just worked again. According to
pg_stat_user_tables, autovacuum didn't hit in. I can't say if there
were backends open for two weeks. At the time it resolved itself, the
oldest backend was from August 27th.

If xmin/xmax/multixact... data from this server is interesting, I can
extract it on request.

Christoph


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



view thread (58+ messages)  latest in thread

Message-ID: <20170830111730.ma2wyxwqrvssbdbq@msg.df7cb.de>
Permalink:  ../20170830111730.ma2wyxwqrvssbdbq@msg.df7cb.de/
Also on:    postgresql.org/message-id/20170830111730.ma2wyxwqrvssbdbq@msg.df7cb.de

 · 

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: christoph.berg@credativ.de, harry.ambrose@gmail.com, scott.marlowe@gmail.com, adsj@novozymes.com
  Subject: Re: ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100
  In-Reply-To: <20170830111730.ma2wyxwqrvssbdbq@msg.df7cb.de>
  References: <20170611033840.hruqadsk47qcdrqb@alvherre.pgsql> <7pfuf5ogho.fsf@novozymes.com> <7py3sll8rf.fsf_-_@novozymes.com> <7pvalxvsco.fsf@novozymes.com> <CAOR=d=3mZRihFjjnPxXae2RXh8OoVPC3RA3=4kt=8gLe4_i76Q@mail.gmail.com> <CAK4Knu86q98fWNzYntsZk1uGca6F129wLShmrkzyb2EZkSMDWQ@mail.gmail.com> <20170830111730.ma2wyxwqrvssbdbq@msg.df7cb.de>

* 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