Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jDZPb-0005bn-Lh for pgsql-general@arkaria.postgresql.org; Sun, 15 Mar 2020 19:59:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jDZPa-0007NI-GQ for pgsql-general@arkaria.postgresql.org; Sun, 15 Mar 2020 19:59:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jDZPY-0007Kp-NF for pgsql-general@lists.postgresql.org; Sun, 15 Mar 2020 19:59:02 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jDZPU-0000XV-PP for pgsql-general@postgresql.org; Sun, 15 Mar 2020 19:58:59 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 723B821FE9; Sun, 15 Mar 2020 15:58:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 15 Mar 2020 15:58:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=L VR794HP4pulPxMJFlgT3sKPObqlmR3O9Wdbvvt80ps=; b=AmwnAYJ15KAmbApFb va9gWG3PakcgvSmAvvdzeEhkpI64uVKof0Beu2bpR3hTHP8zl3Ft2+9KYShakqT2 8R8lZjiqQ6lNRhCvCdTny0vdQigONdB8i8Bcjh+6xX70wN6UVHCyQV1+MhidBdWs ncExF9k8ZaCBKMEj9dGo4c6IXh7deq3WN/mRAvZQUx7ELD0vxjkiunTQ8B0aCrRP 5Y0YOv9+pf27gH5dZETzu/uY2LCuKGxAyeN7bGgUhnqFzHca9Gi3wS6VeM6lIVU4 KZ49IA/T16xbWIiohhl6W3ciXGw/6zA5ZuSA9fvIRRJKZRCjOwxA3uNlheHkzE8c fVX8A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=LVR794HP4pulPxMJFlgT3sKPObqlmR3O9Wdbvvt80 ps=; b=M8VMTnG6PfLiUA2Qk2UHLfvoycV7K3WlFoIpIg6E0BTXmJQ7YzjZQ7YPz XN2SmuYRhquloR5D4+VOKaOw9ddrrEh/o8/6J842751WWK5gcGU9nbJ7qrpQFl4Z 4i00dg44dtsNJQN+KOOiQ4pIk+2WNYQU7lRd+o1nj7t0ZWc6RsoAlJsKQaY583j3 I22gMiMIvaSWbwcciNFdhpyzScyV7BJqgBudPN2HjRco4aYxkBB7ptlJ5ifX+J4z 0r3GMhR0oD5iiCq2dHw9ahGfvOdbCjGYW+xwkvw+pv2c9lqEny89/Rg5NNdje9IK peZcusNVTrt4wVt/WcX9tvXMAt66A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudefuddgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuffhomhgrihhnpegurghtrggsrghsvg hsohhuphdrtghomhdpphhoshhtghhrvghsqhhlrdhorhhgnecukfhppeejuddrvdduvddr uddvledrudelfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.10] (unknown [71.212.129.193]) by mail.messagingengine.com (Postfix) with ESMTPA id B603930618C1; Sun, 15 Mar 2020 15:58:54 -0400 (EDT) Subject: Re: unexpected chunk number 2 (expected 0) for toast value ... in pg_toast_18536 To: pgsql-general@lists.postgresql.org, pgsql-general References: <20200315182349.GL467@hermes.hilbert.loc> <20200315192037.GM467@hermes.hilbert.loc> From: Adrian Klaver Message-ID: <3b7214bd-d0b5-e66f-fd29-240f1eb56cdf@aklaver.com> Date: Sun, 15 Mar 2020 12:58:53 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200315192037.GM467@hermes.hilbert.loc> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 3/15/20 12:20 PM, Karsten Hilbert wrote: > On Sun, Mar 15, 2020 at 07:23:49PM +0100, Karsten Hilbert wrote: > >> We then tried to DELETE the offending row >> >> delete from blobs.doc_obj where pk = 82224; >> >> but that, again, shows the "unexpected chunk" problem. > > According to > > http://www.databasesoup.com/2013/10/de-corrupting-toast-tables.html > > an UPDATE of the row is recommended -- should that work > better than a DELETE ? > > I can't find documentation pointing to a fundamental > implementation difference that suggests so. https://www.postgresql.org/docs/12/storage-toast.html#STORAGE-TOAST-ONDISK "During an UPDATE operation, values of unchanged fields are normally preserved as-is; so an UPDATE of a row with out-of-line values incurs no TOAST costs if none of the out-of-line values change." > > Karsten > -- > GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B > > -- Adrian Klaver adrian.klaver@aklaver.com