Re: logical changeset generation v4 - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: logical changeset generation v4
Date
Msg-id 20130118163339.GD4063@alvh.no-ip.org
Whole thread Raw
In response to logical changeset generation v4  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: logical changeset generation v4
Re: logical changeset generation v4
List pgsql-hackers
Andres Freund wrote:

> [09] Adjust all *Satisfies routines to take a HeapTuple instead of a HeapTupleHeader
>
> For timetravel access to the catalog we need to be able to lookup (cmin,
> cmax) pairs of catalog rows when were 'inside' that TX. This patch just
> adapts the signature of the *Satisfies routines to expect a HeapTuple
> instead of a HeapTupleHeader. The amount of changes for that is fairly
> low as the HeapTupleSatisfiesVisibility macro already expected the
> former.
>
> It also makes sure the HeapTuple fields are setup in the few places that
> didn't already do so.

I had a look at this part.  Running the regression tests unveiled a case
where the tableOid wasn't being set (and thus caused an assertion to
fail), so I added that.  I also noticed that the additions to
pruneheap.c are sometimes filling a tuple before it's strictly
necessary, leading to wasted work.  Moved those too.

Looks good to me as attached.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: HS locking broken in HEAD
Next
From: Robert Haas
Date:
Subject: Re: Event Triggers: adding information