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 1uyjVC-00Bw5p-8G for pgsql-committers@arkaria.postgresql.org; Wed, 17 Sep 2025 04:10:42 +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 1uyjV9-004dUA-QS for pgsql-committers@arkaria.postgresql.org; Wed, 17 Sep 2025 04:10:40 +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 1uyjV9-004dU2-Jn for pgsql-committers@lists.postgresql.org; Wed, 17 Sep 2025 04:10:40 +0000 Received: from mail-il1-x136.google.com ([2607:f8b0:4864:20::136]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uyjV8-000pu4-09 for pgsql-committers@lists.postgresql.org; Wed, 17 Sep 2025 04:10:39 +0000 Received: by mail-il1-x136.google.com with SMTP id e9e14a558f8ab-42404af313aso16547175ab.0 for ; Tue, 16 Sep 2025 21:10:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758082237; x=1758687037; darn=lists.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=jNqPRTs+axz+dauth/mgzA7+dWxlskXWAtMkCgt6Ly8=; b=RQyb/KyJKknBI+F0nedb6YtOM59gj/Lxi1deLMOUeN8CAJGT58/wxlrS+oDzH8Ps4q 4UlZBf2rBa6thnzln4SRSC1QW1yS9aGvnTBcsn1n0BBT2W8ryjibUYQmREopk6zLtqyR pkij12B9sEf/2j9g+9HQUi3Nb/gNx7a3XZS6B2zSV9/ibmgRNPObkHRZAsuZmqxCnqyw ajicnTsAhXiLL7ad8jtHaAMaV55xNrniV4EtpJQuNycvijPrfaLuv5aHxzZ4E/Be5ADX 2g6RtA8OdRN+iWo3PQLyYsvUkbD7wqeOMJeTp92VXhUHuYZJAsD7VpaqmqcyALO634yG bRhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758082237; x=1758687037; 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=jNqPRTs+axz+dauth/mgzA7+dWxlskXWAtMkCgt6Ly8=; b=Z1dvtHpcc0AGr53XwpBmKcUsCQNRKl90+FmHSUrIcJDfBAXZd2keMx9BuQ4FQzZ/1g 2mxUI28gO0u8tZdZ5cFBpqasRjZcXEdVI83vonp09i8VXdLcAqSFrttdYym5PBEc4X30 eKhoJXS1sqU6wyvfWJCZhwaY4vV3VMPKjl69u9pZAZ7lpK/BB2FyBWBTFWoYqyoUoJBQ aN6Jr4eim9VzPPDqQwZUVVRNZLstxCpBcKCXF8iCWOmKeqKjUX7XPGYoObHr8ZWzuU3x 47krCqHRPOm5h220TX7dPIZwroEQvyaMSEYb9s7X+CWkDrbDBfPPgpbZLImNpt1xtXQa dbVg== X-Forwarded-Encrypted: i=1; AJvYcCXkiKUvHEQ6MzuPw3zhlVUA3yUF28qGGHj90AGvZ2hmOP/mKmfySv2nmQCOx4MnXZiHdtpKrCi12y9xmbUQ0tOf@lists.postgresql.org X-Gm-Message-State: AOJu0YzA7vMbnqrmIqeSbsOC8g1kk7utUlT/SWADZyLPg+iN10EncQGc j6Ew+mvJobBccQNQkw/E61dcWGyKEgx4nGNdZZw/GJMTYZHIBwcUCrl+ X-Gm-Gg: ASbGncuteMjWBV5fFuUBC7Fe2T8v3Bh97bkeq9mWBisYQHY6HDvByDN0tCEriTR28aF W5FqY0vKJjrgFTjYMld5o8OQxDEwM7A3zMDx7iJ1LrVuLYRa4VCR30wl7qdei3eyOjFobCwd90+ OPxptXa5fUKOVsv/BED9qXDMQEzz5E70uwnwtJEjr1zADx70VNqN/abd+W3xj1K+Suj5VNSoPsX uMhwgR43PSiQ2wtzU67ZfMtMfeOVdyCY5xN6S4ZMMDYvb0S3c7+f5PhQUljtZZ6ZNSI2viCbwLx hL3WwR5U6k1WwxpimXcRBpYnzN1c81UFOY2zLkyhWEZsz/GlJx3NSEXmK+gpqSuHLJX/T0n+MKG DCOa3HVw2Yd6K007gurn0M/KREdv+IKwO1L/jHEg53ifJ908ylMoDxdlWCV/M+OHnu1+GvhQ2y1 oKU+XrDmgSZIu5 X-Google-Smtp-Source: AGHT+IFl36GxLFOWt8o6tpapmNiC7PI6rHUS+u653ilhl8qALGBXCL3TxJAh0/AE8Wr4W13+Dk7Ubg== X-Received: by 2002:a05:6e02:1a6e:b0:424:47e:c3c with SMTP id e9e14a558f8ab-4241a52642cmr8515315ab.25.1758082237280; Tue, 16 Sep 2025 21:10:37 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-511f30cdf0csm6520305173.84.2025.09.16.21.10.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Sep 2025 21:10:36 -0700 (PDT) Date: Tue, 16 Sep 2025 23:10:34 -0500 From: Nathan Bossart To: Michael Paquier Cc: Nathan Bossart , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Move named LWLock tranche requests to shared memory. Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="U22hRdN7XmUh2Va9" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --U22hRdN7XmUh2Va9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Sep 16, 2025 at 10:27:34PM -0500, Nathan Bossart wrote: > It looks like the postmaster is trying to access the request array after > re-initializing shared memory, which of course fails. So, we need to keep > the request array in postmaster's local memory, too. Attached is a quick > attempt at a fix. I was able to simplify the patch. -- nathan --U22hRdN7XmUh2Va9 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=v2-0001-fix-LWLock-shmem-reinitialization.patch