From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila(at)huawei(dot)com> |
Cc: | 'Hari Babu' <haribabu(dot)kommi(at)huawei(dot)com>, 'Greg Smith' <greg(at)2ndQuadrant(dot)com>, 'Mike Blackwell' <mike(dot)blackwell(at)rrd(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Performance Improvement by reducing WAL for Update Operation |
Date: | 2013-07-23 13:35:34 |
Message-ID: | 20130723133534.GJ21996@alap2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2013-07-23 18:59:11 +0530, Amit Kapila wrote:
> > * I'd be very surprised if this doesn't make WAL replay of update heavy
> > workloads slower by at least factor of 2.
>
> Yes, if you just consider the cost of replay, but it involves other
> operations as well
> like for standby case transfer of WAL, Write of WAL, Read from WAL and
> then apply.
> So among them most operation's will be benefited from reduced WAL size,
> except apply where you need to decode.
I still think it's rather unlikely that they offset those. I've seen wal
replay be a major bottleneck more than once...
> > * It makes data recovery from WAL *noticeably* harder since data
> > corruption now is carried forwards and you need the old data to
> > decode
> > new data
>
> This is one of the reasons why this optimization is done only when the
> new row goes in same page.
That doesn't help all that much. It somewhat eases recovering data if
full_page_writes are on, but it's realy hard to stitch together all
changes if the corruption occured within a 1h long checkpoint...
> > * It makes changeset extraction either more expensive or it would have
> > to be disabled there.
> I think, if there is any such implication, we can probably have the
> option of disable it
That can just be done on wal_level = logical, that's not the
problem. It's certainly not with precedence that we have wal_level
dependent optimizations.
> > I think my primary issue is that philosophically/architecturally I am
> > of
> > the opinion that a wal record should make sense of it's own without
> > depending on heap data. And this patch looses that.
>
> Is the main worry about corruption getting propagated?
Not really. It "feels" wrong to me architecturally. That's subjective, I
know.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2013-07-23 13:42:16 | Re: improve Chinese locale performance |
Previous Message | Andres Freund | 2013-07-23 13:30:56 | Re: make --silent |