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 1utSGm-007Xc3-8h for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Sep 2025 14:46:01 +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 1utSGl-0041oq-F7 for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Sep 2025 14:45:59 +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 1utSGl-0041oi-6H for pgsql-hackers@lists.postgresql.org; Tue, 02 Sep 2025 14:45:59 +0000 Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1utSGi-000Bhl-14 for pgsql-hackers@postgresql.org; Tue, 02 Sep 2025 14:45:59 +0000 Received: by mail-io1-xd30.google.com with SMTP id ca18e2360f4ac-88432e31bdbso464795939f.2 for ; Tue, 02 Sep 2025 07:45:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756824355; x=1757429155; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ZPDrSKNDqEC+pqfqqsgWEuBsLQKVqAuUJXsRml8INGQ=; b=cFB5/s/SgJeD+kDCots5LexJA0Fuy1OZK1XgdHNotuJkAM0fOc56c70tQlxyEeVP2N YiPi3HdwwR8gmWEV5h8PSYcAtkKw5KjsnVtSAqrUs7i+/vU3BS0t6nEDItsG/xF/RvoQ qhS99kN2OcBlemo68gJc2orMOI8TBMnJd+HaKCJl3HR2eL+WBSlI6rsyznn9Ipy25IhA 0yzqwKTdrX62kNALCka6oY0Pv1JWqzhKNfWM6TTeLKh7j6Ku/db1JBxVkr4igswhGpF7 gR9mueBpweHNB67FuzejktiMQJR1jP2U1QjZLn4KwKN6QXu1Qoy+wiOeLAkSC3DHeMLW 5M6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756824355; x=1757429155; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ZPDrSKNDqEC+pqfqqsgWEuBsLQKVqAuUJXsRml8INGQ=; b=QHcvo85xIvWGV0BODlbAbe47o87Cktge6Pu/km5lul4+nX2GzRu6OgUB/9GLh45yNs XPvQ3vPviVSjASoTVRBBUSa5hXBKPkFtgbFrQ5vppsvp1mEX1R/wCt0sYTg/6bcmkZvh OD9wDAcvWkbRPBAOAJHd9U6krOOXjfhFeNfibaFyzsJsheZa9eys4000B/Auje83iVd2 rxTWEEdhUCeTScepBupVIvUDbMGBlM774CQnbE14uPKb+JxkdThHOjvNLP7GCGiz8zYh R4ZdOWiDqTYdoRZ6j1DJKKUgDioQxFEyHoJC2GgVD7yYhjGw+j6OD3Czg+2QkQCejuip hswg== X-Forwarded-Encrypted: i=1; AJvYcCXDZSBFXgxPSY0kduR5W/2fRoUs4ctGtk6gih0/mUik0NSaOcfIrNG9ThdzVK9VVLSPAUDu6gPlrIh77KwU@postgresql.org X-Gm-Message-State: AOJu0YyHCaEvzewpc064Q8aJiqR/Q/20b4Z0WgBAammvoFiTNGZtXizA dKJgcc68aCnVD15+McjtrPzmVXLA1jNclGKy5Wd4a4nED9firkA9aiCt X-Gm-Gg: ASbGncsFh+B3JfmaQvMPvekQPKjcMSxOzf8jg+qO+EytiUQOQq4sYh1usR521efsDqf wEDuo3tEFq4mD52VCAg7m8/3GQxnMA7Z5t90d+cHVGjNhaR2trH3rjyVQq6kKhMSYgr5UegEyTq 72Wy0LmyiJP69EO99/3i4UZjjKd/8SSQbPxh+NCVKvfvhBZi/fZ5/fAxUEUa7aTUWqVIE/QnFn6 5YazHy2P9bs1yqA7PirQVsIbnX9xVph4ePQzUvYMK87ZpxpyBDS/wzTqvQiv45TDMufKnb1V4U7 1AmFi/9xpBrvYS/VqavPI50FLmBlyjeB/TmkcEABxjakbvDCEr/sl2y4x7+vB8b9x2z6bo0aTV9 FELueQtzLL270MAEKZiLh70pERVZoCUno7ZEyFx9n+Lq+b3lld+PxWF8ykVF/D0EJYrDGG0p+3y kUs+6BOu8/Gd6CID0tqIdoa+Y= X-Google-Smtp-Source: AGHT+IHzLl2jLo8bwd7FeBa0pv34GwYo7zhhMF9/aCFGj2WlYScKB7jHNqCKLdSBoqfjqUejSRPzPg== X-Received: by 2002:a05:6602:2b88:b0:881:7e0c:7a79 with SMTP id ca18e2360f4ac-8871f2229acmr2062535039f.2.1756824354800; Tue, 02 Sep 2025 07:45:54 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id ca18e2360f4ac-8872a4f8e38sm221620139f.27.2025.09.02.07.45.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Sep 2025 07:45:54 -0700 (PDT) Date: Tue, 2 Sep 2025 09:45:52 -0500 From: Nathan Bossart To: Bertrand Drouvot Cc: Sami Imseih , Tom Lane , Andres Freund , Rahila Syed , pgsql-hackers Subject: Re: Improve LWLock tranche name visibility across backends Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Sep 01, 2025 at 10:18:46AM +0000, Bertrand Drouvot wrote: > Changes look good. Thanks for looking. > Not directly related, but I think that we can get rid of: > > size = add_size(size, LWLOCK_PADDED_SIZE); > > in LWLockShmemSize() and of: > > ptr += LWLOCK_PADDED_SIZE - ((uintptr_t) ptr) % LWLOCK_PADDED_SIZE; > > in CreateLWLocks(), and just make use of CACHELINEALIGN(). Let's take care of the tranche name stuff first. -- nathan