pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedEasy way to know the original table row/column given a pg_toast.pg_toast_XXXX chunk_id ?
3+ messages / 2 participants
[nested] [flat]
* Easy way to know the original table row/column given a pg_toast.pg_toast_XXXX chunk_id ?
@ 2014-01-24 15:03 Achilleas Mantzios <achill@matrix.gatewaynet.com>
0 siblings, 1 reply; 3+ messages in thread
From: Achilleas Mantzios @ 2014-01-24 15:03 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Easy way to know the original table row/column given a pg_toast.pg_toast_XXXX chunk_id ?
@ 2014-01-24 23:01 Sergey Konoplev <gray.ru@gmail.com>
parent: Achilleas Mantzios <achill@matrix.gatewaynet.com>
0 siblings, 1 reply; 3+ messages in thread
From: Sergey Konoplev @ 2014-01-24 23:01 UTC (permalink / raw)
To: Achilleas Mantzios <achill@matrix.gatewaynet.com>; +Cc: pgsql-admin
On Fri, Jan 24, 2014 at 7:03 AM, Achilleas Mantzios
<achill@matrix.gatewaynet.com> wrote:
[...]
> 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?
I guess there are no way to do it except the search. Try to look at
this article [1], it perfectly describes what one needs to do in such
cases as yours, and contains all the automation stuff also. Hope you
will find it useful.
[1] http://www.databasesoup.com/2013/10/de-corrupting-toast-tables.html
--
Kind regards,
Sergey Konoplev
PostgreSQL Consultant and DBA
http://www.linkedin.com/in/grayhemp
+1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979
gray.ru@gmail.com
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Easy way to know the original table row/column given a pg_toast.pg_toast_XXXX chunk_id ?
@ 2014-01-27 08:32 Achilleas Mantzios <achill@matrix.gatewaynet.com>
parent: Sergey Konoplev <gray.ru@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Achilleas Mantzios @ 2014-01-27 08:32 UTC (permalink / raw)
To: pgsql-admin
On 25/01/2014 01:01, Sergey Konoplev wrote:
> On Fri, Jan 24, 2014 at 7:03 AM, Achilleas Mantzios
> <achill@matrix.gatewaynet.com> wrote:
> [...]
>> 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?
> I guess there are no way to do it except the search. Try to look at
> this article [1], it perfectly describes what one needs to do in such
> cases as yours, and contains all the automation stuff also. Hope you
> will find it useful.
>
> [1] http://www.databasesoup.com/2013/10/de-corrupting-toast-tables.html
>
Very useful, Thank you!
--
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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2014-01-27 08:32 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-01-24 15:03 Easy way to know the original table row/column given a pg_toast.pg_toast_XXXX chunk_id ? Achilleas Mantzios <achill@matrix.gatewaynet.com>
2014-01-24 23:01 ` Sergey Konoplev <gray.ru@gmail.com>
2014-01-27 08:32 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
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