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 1jjitX-0006EH-FE for pgsql-bugs@arkaria.postgresql.org; Fri, 12 Jun 2020 12:34:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jjitU-0007qx-87 for pgsql-bugs@arkaria.postgresql.org; Fri, 12 Jun 2020 12:34:48 +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 1jjitT-0007nk-S2 for pgsql-bugs@lists.postgresql.org; Fri, 12 Jun 2020 12:34:47 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jjitQ-0006Al-Uo for pgsql-bugs@lists.postgresql.org; Fri, 12 Jun 2020 12:34:46 +0000 Received: by mail-qk1-x741.google.com with SMTP id b27so8736971qka.4 for ; Fri, 12 Jun 2020 05:34:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jepsen-io.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=S2kGVo9KqDxh7i9w942a7fvBxGZDfKcb69CzbTJ0EWo=; b=YdYucrn9iJ60iAHa5cCnRzyEDu8MCqN2TURHfhZo6HDJ8KP8t8rjyeikG2gk07GT4W JB2zn60+pbglRaEeyNjKuC0UF5TX2JQAGa2/qZqUdw/nF01iJL7cM7N1/WQKv1di0ZpL dSFbYAFLGM3pL0003l0GpOtcu+JRKeNYPaQ/qW5l5rr/5aScEx05Bpm+ywCy1WFUhHfu /jYbgINQfo1lcgUMDzupzSm9ZR4ROjjscwphHbafanNceRXEKEnX+/8gfycnvHS8rjPF v1wtBQc8ZaLpXkG6pceM2KFJ6QqFhi8LuxHRiAPfEU4PizHkCSijCjEvOsiy9RXbzWY/ YnfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=S2kGVo9KqDxh7i9w942a7fvBxGZDfKcb69CzbTJ0EWo=; b=VIDq2607x4YarilOFxZEuXUhgr6o2xYvEo2Vm5mu4X8YJWkNhfJ1H2EYQTkSbNIVZ7 kl1JQ7l5DAN41oaNTWQ9t0vMKPQtlTV8bJ0sUwJxlT59SHQ+BOjdLlgzIod55nFkU7WA XItkcvyyqDnFGi20oxHAi9UtvgoIMx4UFYEDVGI43Vxi+VQujJwU699vf/haieslwAGq iJjOjl+xEajUI2gwo6UIX6uWRM+LLRtmYLSHIvAwNvOj/DltkO+cU/LFiKcFwX+qMnqh W4iQvSauQI3kIxk3xErcVu9RVo83bm/sl3hUKWEuHtwrcRNTDpMApZykC87WLD1SkIZr vRLg== X-Gm-Message-State: AOAM532OUdHPV4YCcx4ymhSzdpk9u3l20Hv+2zqXLQcLc3z7m/wuF0Af oddwGvF5mfHscFzPwvbFakLyw8osb78= X-Google-Smtp-Source: ABdhPJzbkRo9luhMUqpuhUTwXHOhsyYB4I1UMFotbV+tskHoxVx+2NHHtb7kQP0dvaqd+0c5kp9kIg== X-Received: by 2002:a05:620a:52c:: with SMTP id h12mr2801831qkh.260.1591965283402; Fri, 12 Jun 2020 05:34:43 -0700 (PDT) Received: from ?IPv6:2600:2b00:945a:dd00:17c5:b69b:33d5:543c? ([2600:2b00:945a:dd00:17c5:b69b:33d5:543c]) by smtp.gmail.com with ESMTPSA id o6sm4249756qkh.28.2020.06.12.05.34.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Jun 2020 05:34:42 -0700 (PDT) Subject: Re: Potential G2-item cycles under serializable isolation To: Peter Geoghegan Cc: Andres Freund , Kevin Grittner , Jeff Davis , PostgreSQL mailing lists References: <80e772f7-a46d-7bfd-28d0-4017bf5cd2e5@jepsen.io> <20200609021706.62lwps6uywkp4kxt@alap3.anarazel.de> <0a53caa2-d568-0283-a448-96bd4d68c235@jepsen.io> From: Kyle Kingsbury Message-ID: <25801cd7-3e32-c81b-ad9f-0d3e89802c50@jepsen.io> Date: Fri, 12 Jun 2020 08:34:41 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 6/11/20 6:51 PM, Peter Geoghegan wrote: > On Wed, Jun 10, 2020 at 8:14 PM Kyle Kingsbury wrote: >> I wanted to let you know that I've put together a draft of a report on these >> findings, and if you've got any comments you'd like to offer, I'd be happy to >> hear them, either on-list or privately. >> http://jepsen.io/analyses/postgresql-12.3?draft-token=Kets1Quayfs > You should mention that a fix was committed this morning: > > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=5940ffb221316ab73e6fdc780dfe9a07d4221ebb Ah, fantastic! > You may want to draw attention to the isolation test, since it's a > perfect distillation of the bug. I'm certain that it cannot be > simplified any further. I mentioned it in the discussion, but now I can offer a direct link. Great work. :) > Note that the test involves three transactions/sessions -- not two. > Elle always complained about a pair of transactions that had a cycle, > which were similar to the "foo" and "bar" sessions from the test. But > Elle never said anything about a third transaction (that played the > role of the "trouble" transaction from the test). Of course, this > makes perfect sense -- the third/"trouble" transaction *should* be > totally irrelevant. Note that the UPDATE has to come from a third > session/transaction for things to go awry. And note that the order of > each statement has to match the order from the isolation test. For > example, no problems occur if you flip the order of "trouble_update" > and "bar_select" -- because that would mean that the physical tuple > does not get physically updated before being examined by "bar_select". Ah, thank you. I didn't quite understand this from the second patch commit message. > You should also specifically mention that the next upcoming minor > release will be on August 13th, 2020: > > https://www.postgresql.org/developer/roadmap/ > > Users that are concerned about this bug will be able to get a new > minor release with the fix by that date, at the latest. That's great news. Will do! :) --Kyle