Re: [HACKERS] Broken O(n^2) avoidance in wal segment recycling.

2019-05-06 Thread Thomas Munro
On Tue, May 7, 2019 at 2:45 PM Andres Freund wrote: > I just hit this bad a couple times during some testing. Under load, with > 2500 segments to recycle, it took well over a minute. I wonder if this played a part in the wal_recycle=off-for-ZFS thing. -- Thomas Munro https://enterprisedb.com

Re: [HACKERS] Broken O(n^2) avoidance in wal segment recycling.

2019-05-06 Thread Michael Paquier
On Mon, May 06, 2019 at 08:00:23PM -0700, Andres Freund wrote: > Michael's email had a proposed patch. I think there's a few small > changes needed, but otherwise it looks like the right direction to me. I would not mind seeing this stuff fixed and back-patched. -- Michael signature.asc Descript

Re: [HACKERS] Broken O(n^2) avoidance in wal segment recycling.

2019-05-06 Thread Andres Freund
Hi, On 2019-05-06 22:54:43 -0400, Tom Lane wrote: > Andres Freund writes: > > I think we ought to backpatch a version of this fix. > > Uh ... what fix are you talking about? Michael's email had a proposed patch. I think there's a few small changes needed, but otherwise it looks like the right d

Re: [HACKERS] Broken O(n^2) avoidance in wal segment recycling.

2019-05-06 Thread Tom Lane
Andres Freund writes: > I think we ought to backpatch a version of this fix. Uh ... what fix are you talking about? regards, tom lane

Re: [HACKERS] Broken O(n^2) avoidance in wal segment recycling.

2019-05-06 Thread Andres Freund
Hi, I just hit this bad a couple times during some testing. Under load, with 2500 segments to recycle, it took well over a minute. I think we ought to backpatch a version of this fix. Yes, there've not been many complaints, but there's no messages during log levels one can enable without beeing c