Re: logical changeset generation v6.7

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: logical changeset generation v6.7
Date: 2013-11-29 06:16:39
Message-ID: CA+TgmoYSwHiidW1uZzV9DxRyTj66Op=vAugedOu9yedy+5Vmxw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 14, 2013 at 8:46 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> [ new patches ]

Here's an updated version of patch #2. I didn't really like the
approach you took in the documentation, so I revised it.

Apart from that, I spent a lot of time looking at
HeapSatisfiesHOTandKeyUpdate. I'm not very happy with your changes.
The idea seems to be that we'll iterate through all of the HOT columns
regardless, but that might be very inefficient. Suppose there are 100
HOT columns, the last one is the only key column, and only the first
one has been modified. Once we look at #1 and determine that it's not
HOT, we should zoom forward and skip over the next 98, and only look
at the last one; your version does not behave like that.

I think there's also some confusion in your version about what ends up
in the attnum values: they're normally adjusted by
FirstLowInvalidHeapAttributeNumber, but when bms_first_member returns
-1 then they're not. But that's not a great thing, because -1 is
actually a valid attribute number. I've taken a crack at rewriting
this logic, and the result looks cleaner and simpler to me, but I
haven't tested it beyond the fact that it passes make check. See what
you think.

I haven't completely reviewed every bit of this in depth yet, but it's
1:15am, so I'm going to post what I have and throw in the towel for
tonight.

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

Attachment Content-Type Size
logical-logging-rmh.patch application/octet-stream 60.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2013-11-29 06:30:10 Re: Heavily modified big table bloat even in auto vacuum is running
Previous Message Boszormenyi Zoltan 2013-11-29 05:39:22 Re: Modify the DECLARE CURSOR command tag depending on the scrollable flag