Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iSfrU-0003o2-94 for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Nov 2019 11:22:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iSfrS-00078l-UQ for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Nov 2019 11:21:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iSfoD-0001Xl-V4 for pgsql-bugs@lists.postgresql.org; Thu, 07 Nov 2019 11:18:38 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iSfoB-0001eu-DL for pgsql-bugs@lists.postgresql.org; Thu, 07 Nov 2019 11:18:36 +0000 Received: by mail-wr1-x444.google.com with SMTP id h3so2504432wrx.12 for ; Thu, 07 Nov 2019 03:18:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ZBhcNBgiM0LIny9sYOuML3sh5SwT7yTp/dYM3tGFYzE=; b=xUFEz3gSx3o4ZtjMl1+g5gADKIAbDzZUzIn/C2fcpDK+3jBN6SPVFkOVULUbyOBL0D oXsR5OHbdkl5h5vcxA0/87HlvNEYTe8Kdgbk9pWJhxItUPZwDcukpIN8Ca1tAjI8zgfw BGwctNtQWs5+rP99EjpoeHnitfZASxjJtJikNocnBxci506PV2IdB+EKRvwDHz2BSC1X cGVm/lwYDsxSUYs10aarIxzBWhZ2aMNa7+1aevZzcXpKJHj0R89561K7V2+e7A8n8VGw j5QdHfgRMwRQSLoNdJsIyvG04UxkwDldc25kLoh1RtdrY9t6opi1mQWz5dEg+h+TbJf5 EJyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ZBhcNBgiM0LIny9sYOuML3sh5SwT7yTp/dYM3tGFYzE=; b=in0tJvVAooDa5BCfMR7G2Wkv2YOBcjZJZiTdsabMfdGut8fj/YHvOAmG5CDe2uXudF UnbVcU972XhEWr9J4bAWjl0GHKF/N69lzMRRXcMo1MQ3mW1SbPJpgr8winEyrPsTPomk Xp0Xuu17dia7vZoIwOydA992h2vU/7+EZf1/EkrvHL/dheQi9o/n6+r0Da8Tp7QmIwL0 ABbZcnGqKR9Fd0wn6HVjsqVDTudUpPS09SyFSPvB/EMhhXXjCdhGwmPYlcNT2gBuijVk QfJA5souz1WOu6qV2cx7+udLeB3Iy2vb8brwVp3Mcp6IQNzuBu7Hfq/JwQM/If0VhEmB s/bQ== X-Gm-Message-State: APjAAAXdsndU7ys5aItIUkqhZEcvUmtsvAAuwRiZOc/CxM0wnTNA6BPo HIr9JR8Pfa6HfFl1MWA6Fn0KNQ== X-Google-Smtp-Source: APXvYqxfxldVmu29Me9TV6RY0n2R3qnapTQpVVFzQX+QcS2bbO2Xb5S6yKIjQgSUX25RFyAsPoglZg== X-Received: by 2002:adf:f048:: with SMTP id t8mr2447677wro.237.1573125513802; Thu, 07 Nov 2019 03:18:33 -0800 (PST) Received: from localhost (cst-prg-7-135.cust.vodafone.cz. [46.135.7.135]) by smtp.gmail.com with ESMTPSA id s9sm1527599wmj.22.2019.11.07.03.18.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2019 03:18:24 -0800 (PST) Date: Thu, 7 Nov 2019 12:18:23 +0100 From: Tomas Vondra To: Dilip Kumar Cc: vignesh C , PostgreSQL mailing lists , PostgreSQL Hackers Subject: Re: Reorderbuffer crash during recovery Message-ID: <20191107111823.ujkygoo562nngnza@development> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Nov 07, 2019 at 11:01:17AM +0530, Dilip Kumar wrote: >On Thu, Nov 7, 2019 at 9:55 AM vignesh C wrote: >> >> On Wed, Nov 6, 2019 at 5:41 PM Dilip Kumar wrote: >> > >> > On Wed, Nov 6, 2019 at 5:20 PM vignesh C wrote: >> > > >> > > Hi, >> > > >> > > ... >> > > >> > > Issue1 it seems like if all the reorderbuffer has been flushed and >> > > then the server restarts. This problem occurs. >> > > Issue 2 it seems like if there are many subtransactions present and >> > > then the server restarts. This problem occurs. The subtransaction's >> > > final_lsn is not being set and when ReorderBufferRestoreCleanup is >> > > called the assert fails. May be for this we might have to set the >> > > subtransaction's final_lsn before cleanup(not sure). >> > > >> > > I could not reproduce this issue consistently with a test case, But I >> > > felt this looks like a problem from review. >> > > >> > > For issue1, I could reproduce by the following steps: >> > > 1) Change ReorderBufferCheckSerializeTXN so that it gets flushed always. >> > > 2) Have many open transactions with subtransactions open. >> > > 3) Attach one of the transaction from gdb and call abort(). >> > >> > Do you need subtransactions for the issue1? It appears that after the >> > restart if the changes list is empty it will hit the assert. Am I >> > missing something? >> > >> >> When I had reported this issue I could reproduce this issue with >> sub-transactions. Now I have tried without using sub-transactions and >> could still reproduce this issue. You are right Issue 1 will appear in >> both the cases with and without subtransactions. > >Okay, thanks for the confirmation. > I'm a bit confused - does this happen only with the logical_work_mem patches, or with clean master too? If only with the patches, which version exactly? regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services