Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGdGr-0001N8-Oz for pgsql-bugs@arkaria.postgresql.org; Fri, 02 Jun 2017 03:29:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dGdGq-00021l-DQ for pgsql-bugs@arkaria.postgresql.org; Fri, 02 Jun 2017 03:29:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dGbsK-0003U6-6P for pgsql-bugs@postgresql.org; Fri, 02 Jun 2017 01:59:40 +0000 Received: from mwork.nabble.com ([162.253.133.43]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGbsF-00045L-NP for pgsql-bugs@postgresql.org; Fri, 02 Jun 2017 01:59:38 +0000 Received: from mben.nabble.com (unknown [162.253.133.72]) by mwork.nabble.com (Postfix) with ESMTP id BCE8246921AAA for ; Thu, 1 Jun 2017 18:59:32 -0700 (MST) Date: Thu, 1 Jun 2017 18:59:32 -0700 (MST) From: wangchuanting To: pgsql-bugs@postgresql.org Message-ID: <1496368772770-5964407.post@n3.nabble.com> In-Reply-To: References: <20170531033228.1487.10124@wrigleys.postgresql.org> <28851.1496239047@sss.pgh.pa.us> Subject: Re: BUG #14680: startup process on standby encounter a deadlock of TwoPhaseStateLock when redo 2PC xlog MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.2 (-) 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 Hi Michael, appreciate for your quick response. i look carefully on the patch, because of we removed TwoPhaseStateLock lwlock acquire in `RemoveGXact' and let caller held lwlock, so i think: 1. xact_redo also need held lwlock before call PrepareRedoRemove 2. RecoverPreparedTransactions also need held lwlock before call ProcessTwoPhaseBuffer -- View this message in context: http://www.postgresql-archive.org/BUG-14680-startup-process-on-standby-encounter-a-deadlock-of-TwoPhaseStateLock-when-redo-2PC-xlog-tp5964069p5964407.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs