Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qKIVl-000DxL-Fx for pgsql-bugs@arkaria.postgresql.org; Fri, 14 Jul 2023 13:07:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qKIUk-00264q-55 for pgsql-bugs@arkaria.postgresql.org; Fri, 14 Jul 2023 13:06:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qKIUj-00263T-Ru for pgsql-bugs@lists.postgresql.org; Fri, 14 Jul 2023 13:06:01 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qKIUd-000NUc-Bb for pgsql-bugs@lists.postgresql.org; Fri, 14 Jul 2023 13:06:00 +0000 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-4fbf1f6c771so3239840e87.1 for ; Fri, 14 Jul 2023 06:05:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689339953; x=1691931953; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=OsDu0hctWopQfzgdKDANZtzI40g8qxthNJl3Xou4J/c=; b=lfeqLZAhvgXPQOkgarAEXzWZtajA9kAadqgm1p39rzvYXoeT8G525HNoW5DnjHIk5N TZvFG4CGIWtwnMbN4Ru9WO5WSBhcSjZX3y7BR05FYlRt4b0h8LFBgYSPTHMLHCWJ7y2z 6nro/mF4mmlWUfJz8eK4tqB5vbsEqOYE25wA5Jx+0+dTNy828jyVZ6JFQmDYVYzwX6on FNxLycAHZ+DTdAZOwxysymdXAIo4iWi/qcq3u48JuXa91Vz76Ap9fx6pBW5sIJGVqVK5 eycrJOfWD8Y7UNqMfRxZi/ws3sjbuc9noCsD9/B0pPJjbkEh0/Ez/vCNmmQEvGAfjHxL I6Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689339953; x=1691931953; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OsDu0hctWopQfzgdKDANZtzI40g8qxthNJl3Xou4J/c=; b=CzkODixvpM7Zhlr6KkYcp0m2ukj9V3YQ1BL1a+Twq0NG3w2DogVxMXBvJeHL6Z0nvj 9Ki/oPG9Bqm86DzIldYriZKBA3ZvB2ZX8x7e0DXXvw104bNh+Zq6jtr3hDX5Ku8lGu5o Hoop4BMmPcCvigxXtrRi3lbjmMilDMFHuBPtZt9+Y9HrP9/O8PE49FAnfwCGb5Dkcwt+ Ng6KTZFlKxrAF3GYtT5Xp5DJ4IttOQ5Vab+GsWoIKIuwtahKjXXh0LCgTGqmdy9ohdrc d9rY/B2JIyOCrh26FbWmVi6a5upHFwTd5LDiavOnJKJ4Q9PA+/8vGeEZvIHAve42KDHZ wUrw== X-Gm-Message-State: ABy/qLbXtamBAzrgu5MXrK/cG2kRvo2FmdvFpCcFldWubXE+0bT64zcP qcp85fGkbSfZQ3cMv44NAD0= X-Google-Smtp-Source: APBJJlGF6xZLCQh85PTUf/irE6oQSAFUp7hBPfO7uYyYjjrwPnbOdk4/GX7p/PbC72qvdjOhnHQWXQ== X-Received: by 2002:a05:6512:2315:b0:4f8:5cde:a44f with SMTP id o21-20020a056512231500b004f85cdea44fmr4126443lfu.10.1689339953098; Fri, 14 Jul 2023 06:05:53 -0700 (PDT) Received: from [192.168.10.157] (31-14-83.netrun.cytanet.com.cy. [31.153.14.83]) by smtp.gmail.com with ESMTPSA id bf19-20020a0564021a5300b0051873c201a0sm5700506edb.26.2023.07.14.06.05.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 14 Jul 2023 06:05:52 -0700 (PDT) Message-ID: <70fc3ad6-8c38-d8d7-b690-a1c01f9b1683@gmail.com> Date: Fri, 14 Jul 2023 16:05:51 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: BUG #17949: Adding an index introduces serialisation anomalies. Content-Language: en-US To: Thomas Munro , Heikki Linnakangas Cc: Dmitry Dolgov <9erthalion6@gmail.com>, pgsql-bugs@lists.postgresql.org, Teodor Sigaev References: <20230619121757.gjvuvypp25ngwkux@ddolgov.remote.csb> <20230621090421.4rr55ybndttng7xl@ddolgov.remote.csb> <20230623140542.5tbeg5ikz3cupag3@ddolgov.remote.csb> <20230624135910.zufuollwp57otawo@ddolgov.remote.csb> <4638fef6-ea51-0e0e-d463-d5269575b021@iki.fi> From: Artem Anisimov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Thomas, thank you for the fixes. I've looked up the patches in pg's git repo, and they got me wondering: where is the repo with pg tests? I'd be really uneasy to make changes to concurrency-related code without a decent testsuite to verify them. Best regards, Artem. On 04/07/2023 01:02, Thomas Munro wrote: > On Wed, Jun 28, 2023 at 3:18 PM Thomas Munro wrote: >> I'll push these in a couple of days if there are no further comments. > Done. > > Thanks Artem, Dmitry and Heikki. > > I wonder how we might be more systematic about this. There are some > general principles that were not respected here, but I'm not sure if > they're even written down let alone defended with code. Something to > think about. > > It's not great to add a new use of BufferGetBlockNumber() (in terms of > false sharing just to get a value that we must have had moment earlier > in order to pin the buffer), but we do that all the time. That seems > like a micro-optimisation worth looking into in some systematic way > across all AMs.