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 1j1NE0-0000Mo-HD for pgsql-bugs@arkaria.postgresql.org; Tue, 11 Feb 2020 04:32:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j1NDx-0003gQ-UN for pgsql-bugs@arkaria.postgresql.org; Tue, 11 Feb 2020 04:32:37 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1j1NDx-0003gJ-GZ for pgsql-bugs@lists.postgresql.org; Tue, 11 Feb 2020 04:32:37 +0000 Received: from cyclops.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1j1NDq-0001xL-ML for pgsql-bugs@lists.postgresql.org; Tue, 11 Feb 2020 04:32:37 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id E54C921C56E5; Tue, 11 Feb 2020 07:32:27 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from ars-thinkpad (nat03-43-2.netorn.net [188.35.130.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 2BBB521C56E3; Tue, 11 Feb 2020 07:32:27 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1581395547; bh=wQorMNd01vpseAmp7Gcvewejgv1lIj1W602vCHjgMDw=; h=References:From:To:Cc:Subject:In-reply-to:Date; b=WmXTm1vhFvunEcxhovpSL3nmAE4GCN8ypsNgoQBLH4bPg4n4Gh3TKyiqyUQxG3Bb1 eLP3Ovb6jJ5wnP6KWXnd/PdWRPB/NlP4Wpyevh3o5lpVYWeq6lBU2aJxoVYcDHvRbM HtEV1iTYxFcW+2tnqcYCVMsMB5VSKrgNVYWZ1Ing= References: <87ftjifoql.fsf@ars-thinkpad> <20191024213157.7pm6niybfxgpvmgg@alap3.anarazel.de> <87eez1fh48.fsf@ars-thinkpad> <8736bs81sx.fsf@ars-thinkpad> <871rrb942q.fsf@ars-thinkpad> <87zhdx76d5.fsf@ars-thinkpad> <8736bjoiax.fsf@ars-thinkpad> <87wo8ulhjl.fsf@ars-thinkpad> User-agent: mu4e 1.2.0; emacs 26.0.50 From: Arseny Sher To: Amit Kapila Cc: Andres Freund , "Hsu\, John" , "pgsql-bugs\@lists.postgresql.org" Subject: Re: ERROR: subtransaction logged without previous top-level txn record In-reply-to: Date: Tue, 11 Feb 2020 07:32:22 +0300 Message-ID: <87lfp9u4kp.fsf@ars-thinkpad> MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Amit Kapila writes: >> Attached is raw version of isolation test triggering false >> 'subtransaction logged without...' (case (1)). >> > > This didn't reproduce the desired error for me (tried without a > patch). I think you need to add two more steps ("s2_checkpoint" > "s2_get_changes") at the end of the test to set the restart_lsn at the > appropriate location. That's weird, it reliably fails with expected error for me. There are already two s2_checkpoint's: first establishes potential (broken) restart_lsn (serializes snapshot after first xl_xact_assignment of s0 xact, but before first record of s1 xact), the second ensures s2_get_changes directly following it will actually advance the slot, making that potential restart_lsn real. I don't see how adding s2_checkpoint and s2_get_changes helps here. Do they really provoke error in your setup? Could you check with pg_waldump what's going on? > >> However, frankly I don't >> see much value in it, so I'm dubious whether it should be included in >> the patch. >> > > I think this will surely test some part of the system which was not > tested before, mainly having some subxacts without top-xact getting > decoded even though we don't need to send such a transaction. Can you > prepare a complete patch (for > Stop-demanding-that-top-xact-must-be-seen-before-sub) having this test > as part of it? Ok, will do. -- cheers, arseny