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

From: Harry Ambrose <harry(dot)ambrose(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>, adsj(at)novozymes(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100
Date: 2017-06-13 12:45:21
Message-ID: CAK4Knu9R4nyzBwgWP0-HS8ntNG1tJ2Vtj8x3ecu=+-tqREMESQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Not sure whether its relevant or not, however upon adding an ANALYSE before
the second vacuum the issue has not presented when testing. I have managed
95 cycles thus far.

BEGIN;
CREATE TABLE x (id BIGSERIAL PRIMARY KEY, payload1 VARCHAR, payload2
VARCHAR, payload3 VARCHAR, payload4 BIGINT, payload5 BIGINT);
/* Repeat until 2,000,000 rows are inserted */
INSERT INTO x (id, payload1, payload2, payload3, payload4, payload5) VALUES
(random values of varying length/size to force random toast usage);
COMMIT;

VACUUM (ANALYZE, FULL);

BEGIN;
/* Repeat until all 2,000,000 rows are updated */
UPDATE x SET payload1 = , payload2 = , payload3 = , payload4 = , payload5 =
... again random values of varying length/size to force random toast usage
COMMIT;

ANALYZE x; -- <== New analyse here.

VACCUM (ANALYZE, FULL);

(...)

Vacuum end. 30 sec sleep

Update selective

Inserting the rows

update 0

update 20000

update 40000

update 60000

update 80000

update 100000

update 120000

update 140000

update 160000

update 180000

Update all

Attempting vacuum

Vacuum completed

dropping the table

=========================================

New attempt - number 96

Inserting the rows

Executing 0

Executing 40000

Executing 80000

Executing 120000

Executing 160000

Executing 200000

Executing 240000

Executing 280000

(...)

Many thanks,
Harry

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2017-06-13 13:44:54 Re: ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100
Previous Message Alex Kliukin 2017-06-13 08:58:42 Re: [HACKERS] Why restore_command is called for existing files in pg_xlog?