Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W6iHu-0004xt-Iw for pgsql-admin@arkaria.postgresql.org; Fri, 24 Jan 2014 15:03:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W6iHt-0008K1-7F for pgsql-admin@arkaria.postgresql.org; Fri, 24 Jan 2014 15:03:17 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W6iHs-0008Jt-CI for pgsql-admin@postgresql.org; Fri, 24 Jan 2014 15:03:16 +0000 Received: from adsltrust.ath.forthnet.gr ([194.219.204.174] helo=smadev.internal.net) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W6iHg-0002F0-OP for pgsql-admin@postgresql.org; Fri, 24 Jan 2014 15:03:15 +0000 Received: from smadev.internal.net (smadev [10.9.200.131]) by smadev.internal.net (8.14.7/8.14.7) with ESMTP id s0OF31ZT028634 for ; Fri, 24 Jan 2014 17:03:01 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) Message-ID: <52E280A5.9000007@matrix.gatewaynet.com> Date: Fri, 24 Jan 2014 17:03:01 +0200 From: Achilleas Mantzios User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Easy way to know the original table row/column given a pg_toast.pg_toast_XXXX chunk_id ? Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 0.8 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Hello, just a general question regarding toast, we have run across various instances of problems having to do with corrupted toast data as a consequence of hardware failures. The ERRORs were of the type : "missing chunk number %d for toast value %u in %s" The usual way people try to find the row in the original table is to try a (potentially large) number of queries in a effort to narrow down the problem, and finally find the row with the corrupted TOAST. (yes i know writing a program to do it would be handy, unfortunately the said server of ours lies somewhere in some ocean with limited ISDN connectivity, so in general deployments are a big PITA) I understand the chunk_id is the "oid" of the "value" to be toasted, is there any way to get to the row/column of the toasted table, faster than the aforementioned exhaustive search? What i did in order to research this (not in a context of a specific problem) was in my test server, to create a new row in some toasted table, and then find the newest additions (chunk_id) to the corresponding toast table. But i could not find a way (via pg_* relations) to somehow link the new row of the original table to the set of new rows (chunk_id, chunk_seq) in the toast table. -- Achilleas Mantzios Head of IT DEV IT DEPT Dynacom Tankers Mgmt -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin