Re: preserving forensic information when we freeze

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, Jim Nasby <jim(at)nasby(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: preserving forensic information when we freeze
Date: 2013-12-20 19:12:12
Message-ID: CA+TgmoaV7xCjDfCzaeuJ=m5U_k-nr_f_VYuFCH7DESgQAdabTg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 20, 2013 at 1:41 PM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> Robert Haas escribió:
>> On Fri, Dec 20, 2013 at 7:22 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
>> >> Maybe what we should do is add a function something like
>> >> pg_tuple_header(tableoid, ctid) that returns a record, maybe something
>> >> like (rawxmin xid, rawxmax xid, rawcid cid, infomask int, infomask2
>> >> int, hoff int). Or perhaps some slightly more cooked version of that
>> >> information. And then delete the xmin, xmax, cmin, and cmax system
>> >> columns. That'd save significantly on pg_attribute entries while, at
>> >> the same time, actually providing more information than we do today.
>> >
>> > I was wondering whether we couldn't just pass pg_tuple_header() a whole
>> > row, instead of having the user manually pass in reloid and ctid. I
>> > think that should actually work in the interesting scenarios.
>>
>> I wondered that, too, but it's not well-defined for all tuples. What
>> happens if you pass in constructed tuple rather than an on-disk tuple?
>
> I assume without checking that passing reloid/ctid would allow this to
> work for tuples in a RETURNING clause; and if we ever have an OLD
> reference for the RETURNING clause of an UPDATE, that it would work
> there, too, showing the post-update status of the updated tuple.

I don't understand what you're saying here. Are you saying that
reloid/ctid is a better approach, a worse approach, or just a
different approach?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-12-20 19:13:41 Re: Logging WAL when updating hintbit
Previous Message Robert Haas 2013-12-20 19:10:57 Re: shared memory message queues