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 1jjMUQ-0001op-BI for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Jun 2020 12:39:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jjMUO-0001LG-Hr for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Jun 2020 12:39:24 +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 1jjMUN-0001L8-Uy for pgsql-bugs@lists.postgresql.org; Thu, 11 Jun 2020 12:39:24 +0000 Received: from mail-qk1-x733.google.com ([2607:f8b0:4864:20::733]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jjMUH-00028r-3S for pgsql-bugs@lists.postgresql.org; Thu, 11 Jun 2020 12:39:22 +0000 Received: by mail-qk1-x733.google.com with SMTP id n11so5346546qkn.8 for ; Thu, 11 Jun 2020 05:39:16 -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=TnANXJ3hnpbIq2GoBdAaKy0+qVjvVKdPCj8ky5hkCVI=; b=BF0mHrD4c7+Oa2UoewHgP7zgijBVxZ9GLA3xr+uQ3euvfG78j4HJ/zGRQvhEF/j+IX L6ABZXVjp/eq1LOdor1SKoIIweAljYSc8flrfFUpYk5c/FK9bQc0YGbr9PoRnFpgwST5 OobhXWPpkZSOeie5kKm2deNew1Zh1agQlZSk6l45639OGqtCR+GA7Tw0sklsW/IZ1uEn Q5O1sckc5utVvP/B0Pc7PRWjA/Vf6FFIu+ReB95lkAIXdMZwfA+Gvd/klZJNp7B8YeJj JG0/UJhfcLtxmtyVGBCXncXUBm9iXgOjQXO/buw24InSOmrOeQ0FV1XMyBqzWZi6G0p/ VVZw== 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=TnANXJ3hnpbIq2GoBdAaKy0+qVjvVKdPCj8ky5hkCVI=; b=Emlq4efrBV6V/V79JHtovKEMRM8G8m6+FqLtZb/2Z6NoNGDyuMPKkOSwJQXcMaUJIo JRr0jV2QkYz+zLLp60gwJj/XznVv+2pdxlKJpUsQVfvpMi4jpbEb0laM72XQzWuzPEZX nBWk6UoMZvmmDwsSnBZybSX9X3+rZ4uMs38Nohx13c9CsQ1vrmxOYRm4LUZidp/vqsyQ b/xTAuwiO/JcPDLupuUSNWp8qzj2j4bQ+aOsXI699KZ8ZvBRW7MN40hwq/DYaIRW0bgQ bcWAdUsZqjPw2uJo8MHN4XPKievhqan68Id1wmliqq54s4TolfAVttVMDBq3dhZdBpuB b5Ig== X-Gm-Message-State: AOAM530gsAZ6HfL9pyO6GFBDHzwC91XwwKiA0OZQ22ywVKDAGAp79ALh sq3E4TQRdVMfxWMc/X3bkHJNlMhmADQ= X-Google-Smtp-Source: ABdhPJxe/oV4NwviIYo06kAniR5aypfJ87RQhbOpt4Nb7mzy3x53LYz3tEdDKrOOizDxKyIN9qSpyw== X-Received: by 2002:a37:61d7:: with SMTP id v206mr8785929qkb.100.1591879155245; Thu, 11 Jun 2020 05:39:15 -0700 (PDT) Received: from ?IPv6:2600:2b00:945a:3f00:9e80:e277:c9dd:6bd7? ([2600:2b00:945a:3f00:9e80:e277:c9dd:6bd7]) by smtp.gmail.com with ESMTPSA id v69sm2070421qkb.96.2020.06.11.05.39.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Jun 2020 05:39:14 -0700 (PDT) Subject: Re: Potential G2-item cycles under serializable isolation To: Thomas Munro Cc: Peter Geoghegan , 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: <16b323b2-dfdb-a4c4-fd9d-7b81e52c2375@jepsen.io> Date: Thu, 11 Jun 2020 08:39:13 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 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 1:40 AM, Thomas Munro wrote: > What do you think about this documentation update? I think this is really helpful! You can go a little further if you like. Right now, SSI vs serializable and SI vs RR are both described as "differences in behavior", which kinda leaves it unclear as to how those levels are related. If you want to follow Berenson, Adya, et al.'s broad interpretation, I'd say something like "Snapshot isolation prevents some anomalies, like phantoms, which repeatable read allows. It also allows some anomalies, like G2-item (write skew), which repeatable read prevents." ... and if you like, you could follow that with a discussion of how SI, thanks to ambiguity in the ANSI specification, could also be interpreted as stronger than RR. If you stick with the strict interpretation, I'd add a note here about how readers familiar with the SI literature might be confused, and that you're diverging from Berenson et al., but your position is defensible under the spec. "Serializable Snapshot Isolation is stronger than serializability: it allows only serializable histories--and prohibits some additional histories in addition." If you wanna talk about the performance rationale, that's valid too. :) --Kyle