Re: V2 of PITR performance improvement for 8.4

From: "Fujii Masao" <masao(dot)fujii(at)gmail(dot)com>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: "Koichi Suzuki" <koichi(dot)szk(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: V2 of PITR performance improvement for 8.4
Date: 2008-12-05 01:56:22
Message-ID: 3f0b79eb0812041756m2f0c14a8v7e74f1b4e26ff5c8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Thu, Dec 4, 2008 at 6:11 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>
> On Wed, 2008-12-03 at 14:22 +0900, Koichi Suzuki wrote:
>
>> > There's clearly a huge gain using prefetch, when we have
>> > full_page_writes = off. But that does make me think: Why do we need
>> > prefetch at all if we use full page writes? There's nothing to prefetch
>> > if we can keep it in cache.
>>
>> Agreed. This is why I proposed prefetch optional through GUC.
>>
>> > So I'm wondering if we only need prefetch because we're using lesslog?
>> >
>> > If we integrated lesslog better into the new replication would we be
>> > able to forget about doing the prefetch altogether?
>>
>> In the case of lesslog, almost all the FPW is replaced with
>> corresponding incremental log and recovery takes longer. Prefetch
>> dramatically improve this, as you will see in the above result. To
>> improve recovery time with FPW=off or FPW=on and lesslog=yes, we need
>> prefetch.
>
> It does sound like it is needed, yes. But if you look at the
> architecture of synchronous replication in 8.4 then I don't think it
> makes sense any more. It would be very useful for the architecture we
> had in 8.3, but that time has gone.

Agreed. I also think that lesslog is for archiving in single node rather
than replication between multiple nodes. Of course, it's very useful
for the user who doesn't use replication.. etc.

> So if we find a way of streaming WAL without FPW then this patch makes
> sense, but not until then. So far many people have argued in favour of
> using FPW=on, which was the whole point of pg_lesslog. Are we now saying
> that we would run the primary with FPW=off?

If we always recover a database from a base backup, the primary can run
with FPW=off. Since we might need a fresh backup when making the failed
server catch up with the current primary, such restriction (always recovery
from a backup) might not matter.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2008-12-05 02:29:15 Re: Updates of SE-PostgreSQL 8.4devel patches (r1268)
Previous Message Robert Haas 2008-12-05 01:39:48 Re: Simple postgresql.conf wizard