Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X1kcg-0004Aw-O3 for pgsql-performance@arkaria.postgresql.org; Mon, 30 Jun 2014 23:04:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X1kcg-0007db-85 for pgsql-performance@arkaria.postgresql.org; Mon, 30 Jun 2014 23:04:30 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X1kcf-0007dV-8r for pgsql-performance@postgresql.org; Mon, 30 Jun 2014 23:04:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X1kcc-0003Zr-GE for pgsql-performance@postgresql.org; Mon, 30 Jun 2014 23:04:27 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s5UN4KLP024456; Mon, 30 Jun 2014 19:04:20 -0400 From: Tom Lane To: Jeff Frost cc: Andres Freund , Matheus de Oliveira , Soni M , Heikki Linnakangas , pgsql-performance Subject: Re: Postgres Replaying WAL slowly In-reply-to: <571D044B-260A-4E06-ACBC-8869B8F73C0F@pgexperts.com> References: <20140630171416.GK21422@awork2.anarazel.de> <8DA8C140-818D-4184-AAE6-CA37278B983C@pgexperts.com> <20140630183908.GT26930@awork2.anarazel.de> <0A7B96D4-DB10-49A8-A268-F28960F2E137@pgexperts.com> <20300.1404156750@sss.pgh.pa.us> <20140630201523.GV26930@awork2.anarazel.de> <943ECC8E-8899-422E-937C-50DE20E1F7AC@pgexperts.com> <21474.1404160784@sss.pgh.pa.us> <2E438E7D-E3C1-47A1-A1AF-9FE50A14A302@pgexperts.com> <571D044B-260A-4E06-ACBC-8869B8F73C0F@pgexperts.com> Comments: In-reply-to Jeff Frost message dated "Mon, 30 Jun 2014 14:52:22 -0700" Date: Mon, 30 Jun 2014 19:04:20 -0400 Message-ID: <24455.1404169460@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Jeff Frost writes: >>> So it seems like we have a candidate explanation. I'm a bit surprised >>> that StandbyReleaseLocks would get this slow if there are only a dozen >>> AccessExclusiveLocks in place at any one time, though. Perhaps that >>> was a low point and there are often many more? > Since we turned on the monitoring for that, we had a peak of 13,550 > AccessExclusiveLocks. Ah ... that's more like a number I can believe something would have trouble coping with. Did you see a noticeable slowdown with this? Now that we've seen that number, of course it's possible there was an even higher peak occurring when you saw the trouble. Perhaps there's an O(N^2) behavior in StandbyReleaseLocks, or maybe it just takes awhile to handle that many locks. Did you check whether the locks were all on temp tables of the ON COMMIT DROP persuasion? regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance