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 1urLjj-004g0C-0x for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Aug 2025 19:23:12 +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 1urLji-00HBFV-Ad for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Aug 2025 19:23:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1urLji-00HBFN-0e for pgsql-hackers@lists.postgresql.org; Wed, 27 Aug 2025 19:23:10 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1urLjg-002C5N-0t for pgsql-hackers@postgresql.org; Wed, 27 Aug 2025 19:23:10 +0000 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-afcb7a7bad8so19766566b.3 for ; Wed, 27 Aug 2025 12:23:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756322587; x=1756927387; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=GFYLXfNOwq29L0UgbbvfjwtwPC62zr37frk0Svd1XWQ=; b=PwEtmcdVCN9lt9zXafRIbndY2U0kvoBw6IYbBSPv5+b8oF0cYIx3gvMs8s2Qy5pseu YulaH4me1ahI/BVpi12e+tpgx6Xvbd4ef3gL6aT4UaOLFa3vrLN2wVEYosbki8rgkof4 fhOhVD/sqKvI+1rZj2ifSCuTaf0OBhAf+8/c/TnBVJEedJXgu8YfefaFOZMOqCjE6i4y 9bw1p79QejJ3cEP89rSYMdxgD/hYYuzP7urNp6yZzND25D0afbTaL95bYfZvknrJuYyh ekMzFpbxY5H9At7H4Esayw3atdnTn2JJq7hUErF5LKyNuaLUcKAKYk4pxcHanBVH3SpF gEaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756322587; x=1756927387; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GFYLXfNOwq29L0UgbbvfjwtwPC62zr37frk0Svd1XWQ=; b=KXGsdpOJNNxp++b5h/E6C/JtRsh9M3GC6rMMoRtY7QNrxDGE0pRVoCTomtLD+HL9V0 dq2CPUWna9W2gkXdaRd17nvhdMfaOPlQf3OkpCUMSFO7YvuL8W4Dpgp6ohGGN2Ocjwi6 9WF+kLdhH4u+4sWW0a39kYphXDaaL02spjkw0Zgdz9eWyd/bVAr3UYgPgrJc1tSh1as3 1r6+yYMV1vEoMTuwt7R41pATwghOhZfxdBAyntvNTYmsVhvwaYsd/tWd2Kwsk7+NcvV8 58DmUo0iowgImw/pUoyEnBZFeq1L6HRtDjexjlz/vzyYYQ2pZI7uLMkozswSUfCtkAsf OGrQ== X-Forwarded-Encrypted: i=1; AJvYcCXi/XCPETpnToHBDeIja81+P5R82Nf2+3lQAkzrrY4QKKosB9jDy8nC2F/TqTzVVY3tHXEc4I0TvXw2TLTi@postgresql.org X-Gm-Message-State: AOJu0Yx5aU6Djynq6Y0/dnsKtM6YZDPpvdbZ92qxs4PZnxQzCKvs988B R6ltcaDsrsuIYe6TJ3iI9OO4IU1nkM8BJNmGk51y8yL7X7HwxGEEfjf3Rxs6wlhETTDPfPoIXAz yQ0rVkpOdjNaWuchRjqrTKrEpR3hAYis= X-Gm-Gg: ASbGncvR5ex8g/ySJHNJoMtO5CkuxKyzbXxPqlfNZtOubeavdf8JiUIer4pzA345Cat hIXExzlC7rlr1eeFjDNmxJFOmZaOnxKq+3zosjXUNiOQtZl7zTq/O9hAmBYpT+pBMc+KHZ44XCb V8HYoZjh5NhpB/5thgRk2xQ7LdrL74k8YiRfG4A8koaqJYr9vdSjDpCMHk1IJdo0dITuQmfK5ej L1c3MAihSddDywazYfCahn1HpIcEam2E1YYfWODng== X-Google-Smtp-Source: AGHT+IFKqG0aCD7r9HyXymHnoZ68yYtXszZEEmcZ4LzKZHTsbRitivvstHPJo89fBGWkgbt2YcF+cagTbCdUKXmjm8A= X-Received: by 2002:a17:906:d542:b0:afe:a6d3:b4a2 with SMTP id a640c23a62f3a-afec348ac79mr364245166b.11.1756322586592; Wed, 27 Aug 2025 12:23:06 -0700 (PDT) MIME-Version: 1.0 References: <20250827001449.fb.nmisch@google.com> In-Reply-To: From: Robert Haas Date: Wed, 27 Aug 2025 15:22:55 -0400 X-Gm-Features: Ac12FXzGXvuJEGhN3Kg9bhErNiWORAdb1PuTxx6OF0ZTJo00qQlZkGPbvt3XTtI Message-ID: Subject: Re: Buffer locking is special (hints, checksums, AIO writes) To: Andres Freund Cc: Noah Misch , pgsql-hackers@postgresql.org, Melanie Plageman , Thomas Munro , Heikki Linnakangas Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Aug 27, 2025 at 12:18=E2=80=AFPM Andres Freund = wrote: > Which would leave us with: > - reference (pins today) > - share > - share-exclusive > - exclusive > - cleanup > > This doesn't quite seem to map onto the heavyweight lock levels in a sens= ible > way... Could do: ACCESS SHARE, SHARE, SHARE UPDATE EXCLUSIVE, EXCLUSIVE, ACCESS EXCLUSIVE. I've always thought that a pin was a lot like an access share lock and a cleanup lock was a lot like an access exclusive lock. But then again, using the same terminology for two different things might be confusing. --=20 Robert Haas EDB: http://www.enterprisedb.com