Re: pageinspect: add tuple_data_record()

From: Andres Freund <andres(at)anarazel(dot)de>
To: James Coleman <jtc331(at)gmail(dot)com>
Cc: dhyan(at)nataraj(dot)su, pgsql-hackers(at)lists(dot)postgresql(dot)org, Teodor Sigaev <teodor(at)sigaev(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pageinspect: add tuple_data_record()
Date: 2018-10-17 16:54:13
Message-ID: 20181017165413.opmdtshax7pz6myy@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2018-10-17 12:36:54 -0400, James Coleman wrote:
> >
> >
> > I did compleatly got the question... The question is it safe to split
> > tuple
> > record into array of raw bytea? It is quite safe from my point of view.
> > We
> > use only data that is inside the tuple, and info from pg_catalog that
> > describes the tuple structure. So we are not affected if for example toast
> > table were cleaned by vacuum. If you try to deTOAST data when TOAST table
> > were
> > already overwritten by new data, you can get some trouble...
> >
> >
> The existing tuple_data_split() method already explicitly allows deTOASTing
> data,
> so if this is a problem, the problem already exists in pageinspect.

Indeed. But I do think your approach - which means that the binary data is
actually interpreded as a datum of a specific type, drastically
increases the risk.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message James Coleman 2018-10-17 17:04:33 Re: pageinspect: add tuple_data_record()
Previous Message Nikolay Shaplov 2018-10-17 16:51:46 Re: pageinspect: add tuple_data_record()