Re: pageinspect patch, for showing tuple data

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Nikolay Shaplov <n(dot)shaplov(at)postgrespro(dot)ru>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pageinspect patch, for showing tuple data
Date: 2015-08-03 05:30:46
Message-ID: CAB7nPqSybvk1BtuVZcvKe+jrd2QkAoyPdDZ8QL_fKAaJqEkL3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 3, 2015 at 1:03 AM, Nikolay Shaplov
<n(dot)shaplov(at)postgrespro(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Piotr Stefaniak 2015-08-03 05:50:31 Re: [sqlsmith] Failed assertion in joinrels.c
Previous Message Piotr Stefaniak 2015-08-03 05:23:34 Re: [sqlsmith] Failed assertion in joinrels.c