Re: pageinspect patch, for showing tuple data - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: pageinspect patch, for showing tuple data
Date
Msg-id CAB7nPqSybvk1BtuVZcvKe+jrd2QkAoyPdDZ8QL_fKAaJqEkL3Q@mail.gmail.com
Whole thread Raw
In response to pageinspect patch, for showing tuple data  (Nikolay Shaplov <n.shaplov@postgrespro.ru>)
Responses Re: pageinspect patch, for showing tuple data
List pgsql-hackers
On Mon, Aug 3, 2015 at 1:03 AM, Nikolay Shaplov
<n.shaplov@postgrespro.ru> wrote:
> Hi!
>
> I've created a patch for pageinspect that allows to see data stored in the
> tuple.
>
> This patch has two main purposes:
>
> 1. Practical: Make manual DB recovery more simple

To what are you referring to in this case? Manual manipulation of
on-disk data manually?

> b) I have plenty of sanity check while reading parsing that tuple, for this
> function I've changed error level from ERROR to WARNING. This function will
> allow to write proper tests that all these checks work as they were designed
> (I hope to write these tests sooner or later)

+                ereport(inter_call_data->error_level,
+                        (errcode(ERRCODE_DATA_CORRUPTED),
+                            errmsg("Data corruption: Iterating over
tuple data reached out of actual tuple size")));
I don't think that the possibility to raise a WARNING is a good thing
in those code paths. If data is corrupted this may crash, and I am not
sure that anybody would want that even for educational purposes.
-- 
Michael



pgsql-hackers by date:

Previous
From: Piotr Stefaniak
Date:
Subject: Re: [sqlsmith] Failed assertion in joinrels.c
Next
From: Piotr Stefaniak
Date:
Subject: Re: [sqlsmith] Failed assertion in joinrels.c