Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XzBII-0005cE-T7 for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Dec 2014 21:29:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XzBII-0001Jx-8O for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Dec 2014 21:29:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XzBIH-0001Jk-FB for pgsql-bugs@postgresql.org; Thu, 11 Dec 2014 21:29:05 +0000 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XzBIC-0004Ln-Q8 for pgsql-bugs@postgresql.org; Thu, 11 Dec 2014 21:29:04 +0000 Received: by mail-pa0-f48.google.com with SMTP id rd3so5803589pab.35 for ; Thu, 11 Dec 2014 13:28:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janrain.com; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=GL979L6Uhvzc9bKYS4HpP/chXL7+C66ZON3Mwo2Scjg=; b=S7T4tK33phmbzFhqPLfE3o0kgvNg0F5hEWnVmSz9OGYptjtbULKmO2J4kKj6N95kZr fhklpZ2cBfvfU/GyEi0u2DvLObzoqmXuJh2HWT/o+jvsMVjcm2bBv7gRRfvqekbbpzG0 BgW6tU09AmGi8sYFcjsR+Ii/ERfnk79k3CueM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=GL979L6Uhvzc9bKYS4HpP/chXL7+C66ZON3Mwo2Scjg=; b=Bc8qZ1yWnQP6Cy2lkAk0B3BfVx0HVN1JLMDgNEqKJ12/RVc4epqRgjt0QJO1rzaYeb KNPGl8QMaDnK4Oxb0Bhbq0ALWDl7aGIxqAwPBW/WiXIwROoU6cuIr7GcorukKiTmF0pD aVUzu8k9J9/RLPrAYxy5yneF9EqJem7kCO2gYxlxfCsqR8XcEHrR+zJ7DEGEmDCkdwXB wZFTlnUcRqeyq+ghvWs5kTEu2gvS2vdwJpbCLeFB6mGrdiurM4SQ/y8XuK1JKujMdv4p 8kwlixoiguD3+acIMunItH5uQKNPJBfvjKpuYKgKj9aVjZN1Ira19+Y4/3jaqRN+ixVd NIDg== X-Gm-Message-State: ALoCoQlAPZJHhivmAgllZwUrca7aMbsTQLopooRQtvlyaiDUSJupVJnIdEsZhSq0dCLwjGTlLi2+ X-Received: by 10.70.50.162 with SMTP id d2mr20553468pdo.85.1418333337858; Thu, 11 Dec 2014 13:28:57 -0800 (PST) Received: from andrew-ThinkPad-X230 (173-164-68-213-Oregon.hfc.comcastbusiness.net. [173.164.68.213]) by mx.google.com with ESMTPSA id ej12sm2221001pac.28.2014.12.11.13.28.56 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 11 Dec 2014 13:28:57 -0800 (PST) Date: Thu, 11 Dec 2014 13:28:55 -0800 From: Andrew Sackville-West To: Alvaro Herrera Cc: Mark Kirkwood , pgsql-bugs@postgresql.org, Paulo Tanimoto Subject: Re: regression, deadlock in high frequency single-row UPDATE Message-ID: <20141211212855.GL22364@andrew-ThinkPad-X230> Mail-Followup-To: Alvaro Herrera , Mark Kirkwood , pgsql-bugs@postgresql.org, Paulo Tanimoto References: <20140804163027.GI5475@eldon.alvh.no-ip.org> <20141208235552.GZ6930@andrew-ThinkPad-X230> <54868FA2.80003@catalyst.net.nz> <5487B8F2.6050806@catalyst.net.nz> <20141210193314.GZ1768@alvh.no-ip.org> <5488C197.3060900@catalyst.net.nz> <548943C7.2030507@catalyst.net.nz> <20141211130653.GG1768@alvh.no-ip.org> <20141211172256.GB20615@alvh.no-ip.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141211172256.GB20615@alvh.no-ip.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Thu, Dec 11, 2014 at 02:22:56PM -0300, Alvaro Herrera wrote: > Alvaro Herrera wrote: > > > I'm going to experiment with that idea and see if it leads to a > > solution. I tried the other idea yesterday (to keep the HW tuple lock > > we acquire in heap_lock_tuple until heap_update is done) but aside from > > being very complicated and bug-prone, it doesn't solve the problem > > anyway. > > Here's a preliminary patch. It does solve the deadlock in my simplified > test case. If Andrew can confirm that it fixes his original problem > too, that'd be good. We can try that. We don't currently build our own pg, so it'll take a bit for us to get there. I'll report back with results. A -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs