Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mVI4n-0001l5-N6 for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Sep 2021 18:43:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mVI4m-0000Eb-Le for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Sep 2021 18:43:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mVI4m-0000ET-20 for pgsql-hackers@lists.postgresql.org; Tue, 28 Sep 2021 18:43:36 +0000 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mVI4j-00051S-7j for pgsql-hackers@postgresql.org; Tue, 28 Sep 2021 18:43:34 +0000 Received: by mail-pj1-x1033.google.com with SMTP id k23so15637283pji.0 for ; Tue, 28 Sep 2021 11:43:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=2Sw8L1h4jyJwbC3ALwezxVAN4NfAAledAmsLR8gHSr0=; b=QsH6gGLCraZBpkwO1vK8cab4HF+jHg5D0sV8omL8N669Hr10FcyurFB4dLZ10VTNMr 1zCJOoHHbiKXw6k9M543OnJzXaSE+ice+Tbt2Yob5RfKkI9RnkcT2xA1fdB/hQjKq+lC B/9I+f0A+y2P1FQ8GOkisasmaek0WdOdbFoefn/MpP450OyRHwctu6Acfuxx0SbOZo1E /hG8ZwKZrJ7ahV4wJG82q67rPuGkzKfRy0rFJn7tmBeK/8SBhdoeukatZ9mZFoU2M/tN cMcB3tPyDPLvtbxuF6VrC1JKijF15dGsbTfss5oBLz7EpDRRVz5WxI3CDiqP3jF2A7uN 6rrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=2Sw8L1h4jyJwbC3ALwezxVAN4NfAAledAmsLR8gHSr0=; b=Ay4c7BpowszdAcVW/75gvn2LasSzG9sjhHf8A2MGowvBss9AkiFzqbRak8v9rVvvd4 kptp2ztqsXo5+pofJFhEgdko9EbOFUjxnE5qg0uzfORdVipBW72nHOptF+V8PJEK/oQM dMu/vOLMpLTrvFS4SOFHFt/EC9nBHj1pRg9wnWJCaRsb5TELHOgdJFlnbyd3uySAkSq0 4qmomOvn5yDim1qYoEsull1YMVBM8hZP6pr4tTboJIV1FU66HdDJQMDXq6aE1sgWpkzC SPm+wMioXdmFLUAT2N0IXABBZzRvk6kXB6G3BLt8iBqlcHvqrR3+ry261pqhZpEnMX0J qjGg== X-Gm-Message-State: AOAM530WyCdVkjet2xarVUjp0gUlL8JY8SQUg7oTKviEFCG/t3aNrOXv EKYuu93A6Jrmgfv6W0Kmkqcp3AtyhiKzSvykTlUozQ+rnVtesJNhOkM0pCdXTFKsP2quLg+G0cV zn6I/6HBXTOEWc0avK15eJRrIAAI3eRWvC36G0g0tX3WHE2x61SifqMBPiN/iw4/X74bj3wbv1m 106dLpXweGCzxf7btkt5A1PPk2BVr1d6YokUcH X-Google-Smtp-Source: ABdhPJz+3FbiRueYXk6S0ZgHgn1kLcPJ+0abUEFQh6+htjYp0gEl1L1F4N2iNtplgviM96XAmX1zow== X-Received: by 2002:a17:90a:4fc4:: with SMTP id q62mr1482379pjh.159.1632854612012; Tue, 28 Sep 2021 11:43:32 -0700 (PDT) Received: from ?IPv6:2600:100f:b023:f141:6d39:525a:67fb:a7f8? ([2600:100f:b023:f141:6d39:525a:67fb:a7f8]) by smtp.gmail.com with ESMTPSA id 126sm25554206pgi.86.2021.09.28.11.43.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Sep 2021 11:43:31 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: Fixing WAL instability in various TAP tests From: Mark Dilger In-Reply-To: <0AE9B97A-EE55-41DD-A913-CDBCAA8E2214@enterprisedb.com> Date: Tue, 28 Sep 2021 11:43:30 -0700 Cc: Michael Paquier , Andrew Dunstan , Noah Misch , PostgreSQL-development Content-Transfer-Encoding: quoted-printable Message-Id: <2B700487-C43E-41AF-A8B3-444A12DFEC30@enterprisedb.com> References: <32A1FDD1-9C7B-43B1-B3EE-49198DD3F887@enterprisedb.com> <20210925052151.GA4082552@rfd.leadboat.com> <2E9D28A3-1B54-446B-AC12-3BF86A2B522A@enterprisedb.com> <2502590.1632579467@sss.pgh.pa.us> <2B4C64CF-EE3F-474B-9685-6A927E5E49AE@enterprisedb.com> <20210925160039.GA4134968@rfd.leadboat.com> <193AC968-C348-4D81-88BC-384560F87500@enterprisedb.com> <2769443.1632773967@sss.pgh.pa.us> <2801531.1632795612@sss.pgh.pa.us> <2852500.1632850031@sss.pgh.pa.us> <0AE9B97A-EE55-41DD-A913-CDBCAA8E2214@enterprisedb.com> To: Tom Lane X-Mailer: Apple Mail (2.3608.120.23.2.7) X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Sep 28, 2021, at 11:07 AM, Mark Dilger = wrote: >=20 > Looking closer at the TAP test, it's not ORDERing the result set from = the SELECTs on either node, but it is comparing the sets for stringwise = equality, which is certainly order dependent. Taking the output from the buildfarm page, parsing out the first test's = results and comparing got vs. expected for this test: is($primary_result, $standby_result, "$test_name: query result = matches"); the primary result had all the same rows as the standby, along with = additional rows. Comparing the results, they match other than rows = missing from the standby that are present on the primary. That seems = consistent with the view that the query on the standby is running before = all the data has replicated across. However, the missing rows all have column i either 0 or 3, though the = test round-robins i=3D0..9 as it performs the inserts. I would expect = the wal for the inserts to not cluster around any particular value of i. = The DELETE and VACUUM commands do operate on a single value of i, so = that would make sense if the data failed to be deleted on the standby = after successfully being deleted on the primary, but then I'd expect the = standby to have more rows, not fewer. Perhaps having the bloom index messed up answers that, though. I think = it should be easy enough to get the path to the heap main table fork and = the bloom main index fork for both the primary and standby and do a = filesystem comparison as part of the wal test. That would tell us if = they differ, and also if the differences are limited to just one or the = other. I'll go write that up.... =E2=80=94 Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company