Re: logical changeset generation v6.2

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.2
Date: 2013-10-22 17:57:53
Message-ID: CA+TgmoZTS8LArpi2_tv7zX3MUtH8fLA35NzbN4hqsQQixnH-XQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 22, 2013 at 1:08 PM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
>> It seems to me that you have to think of the CTID map as tied to a
>> relfilenode; if you try to use one relfilenode's map with a different
>> relfilenode, it's obviously not going to work. So don't do that.
>
> It has to be tied to relfilenode (+ctid) *and* transaction
> unfortunately.

I agree that it does, but it doesn't seem particularly unfortunate to me.

>> That strikes me as a flaw in the implementation rather than the idea.
>> You're presupposing a patch where the necessary information is
>> available in WAL yet you don't make use of it at the proper time.
>
> The problem is that the mapping would be somewhere *ahead* from the
> transaction/WAL we're currently decoding. We'd need to read ahead till
> we find the correct one.

Yes, I think that's what you need to do.

> But I think I mainly misunderstood what you proposed. That mapping could
> be written besides relfilenode, instead of into the WAL. Then my
> imagined problem doesn't exist anymore.

That's pretty ugly. I think it should be written into WAL.

--
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 Andres Freund 2013-10-22 18:13:20 Re: logical changeset generation v6.2
Previous Message Stephen Frost 2013-10-22 17:56:52 Re: Reasons not to like asprintf