Re: Improving replay of XLOG_BTREE_VACUUM records - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Improving replay of XLOG_BTREE_VACUUM records
Date
Msg-id CAB7nPqSU73Kmjx+JC9XPhiD4HCpCSjamVpZup4hjdRCqeyjXpA@mail.gmail.com
Whole thread Raw
In response to Re: Improving replay of XLOG_BTREE_VACUUM records  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Improving replay of XLOG_BTREE_VACUUM records  (Vladimir Borodin <root@simply.name>)
List pgsql-hackers
On Thu, Jan 7, 2016 at 12:20 AM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> Vladimir Borodin wrote:
>
>> There are situations in which vacuuming big btree index causes stuck
>> in WAL replaying on hot standby servers for quite a long time. I’ve
>> described the problem in more details in this thread [0]. Below in
>> that thread Kevin Grittner proposed a good way for improving btree
>> scans so that btree vacuuming logic could be seriously simplified.
>> Since I don’t know when that may happen I’ve done a patch that makes
>> some improvement right now. If Kevin or someone else would expand [1]
>> for handling all types of btree scans, I suppose, my patch could be
>> thrown away and vacuuming logic should be strongly rewritten.
>
> You submitted this patch in May 2015 -- and 7 months later, Simon came
> up with another patch that's supposed to fix the underlying problem, so
> that this shouldn't be a problem anymore.
>
> Would you please have a look at Simon's patch, in particular verify
> whether it solves the performance dip in your testing environment?
> https://www.postgresql.org/message-id/CANP8%2BjJuyExr1HnTAdZraWsWkfc-octhug7YPtzPtJcYbyi4pA%40mail.gmail.com
> (Note there's an updated patch a few emails down the thread.)
>
> If it seems to fix the problem for you, I think we should mark yours
> rejected and just apply Simon's.

Simon's patch (justly) does not update lastBlockVacuumed in the case
of toast indexes, but Vladimir's patch would still optimize this case,
no?
--
Michael



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Add numeric_trim(numeric)
Next
From: Michael Paquier
Date:
Subject: Re: No Issue Tracker - Say it Ain't So!