Re: Re: xReader, double-effort (was: Temporary tables under hot standby)

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, andres(at)2ndquadrant(dot)com, aakash(dot)bits(at)gmail(dot)com, josh(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: xReader, double-effort (was: Temporary tables under hot standby)
Date: 2012-04-28 17:06:25
Message-ID: CA+U5nMLv91h9oSrKyCryuiTFjEexWu3DPCk4s2S-57GjfNQGUg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Apr 28, 2012 at 4:43 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
>> Tom Lane  wrote:
>>> Simon Riggs  writes:
>>>> Translating WAL is a very hard task.
>>> No kidding. I would think it's impossible on its face.
>
>> Well, the xReader approach (Aakash's GSoC project) is to serve as a
>> proxy for a WAL stream going to a hot standby, to interpret each
>> incoming WAL record by "cheating" and querying the HS before passing
>> the WAL along, and then using sync rep to the HS regardless of
>> whether the incoming stream is sync or async.  What reliability
>> problem do you see with this approach?
>
> Well, first off, it requires a replica that *is* a physical replica
> (else it won't have the same table OIDs, for instance).

It's even harder than that because the physical replica needs to be
able to be shutdown/restarted. We currently restart WAL from last
checkpoint, but if changes have already been made and committed then
the catalog will be incorrect when we replay the WAL again. So, I
think saying very hard is justified.

We basically have a choice of shipping full metadata with every change
or finding some way to avoid doing that. Investigating the latter
seems like a worthwhile task but there are limits, as you say.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2012-04-28 19:40:42 Re: Future In-Core Replication
Previous Message Magnus Hagander 2012-04-28 17:05:56 Re: 9.2 release notes, beta time?