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.96) (envelope-from ) id 1x1d0s-005KO6-0N for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Sep 2026 04:55:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x1d0q-00AAgN-2Y for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Sep 2026 04:55:52 +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.96) (envelope-from ) id 1x1d0p-00AAgF-2u for pgsql-hackers@lists.postgresql.org; Wed, 02 Sep 2026 04:55:52 +0000 Received: from fhigh-a7-smtp.messagingengine.com ([103.168.172.158]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x1d0m-00000002UII-1oRY for pgsql-hackers@lists.postgresql.org; Wed, 02 Sep 2026 04:55:51 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.phl.internal (Postfix) with ESMTP id 564FD14000E4; Wed, 2 Sep 2026 00:55:46 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Wed, 02 Sep 2026 00:55:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1788324946; x=1788411346; bh=cG8aQogDk6 usIqBs+ny9I88KV5fGWMX2sJqDExHiBL0=; b=WW5CFY6+Ai/3RyVKnO338OKCwy UI2OE5lypokUyMg7vR5/gVD++nqRKc5Fh4/NseZHc/eJxpcFbyUVWQP1Xn8/0Hgo hOSEQxDYKy4DwCN7HGhvqpfoVkHTDiL2bQEKMrz8xG8Jz+nMP/Wynca2YOXDH/IJ AqoyyOj2qJYHEucnk6ELVgvT8XSBkUteUaC2LSAbKRb4OZ+rrwcrJ6oJCdWMmxe4 JuVcOBVfQ0BW++8QQEbw8dD/3xmAujiV486ChOxRpF9rf9AT7XM/2SLgEHqITs/k n719PLHvHCykNve5WkbwzNXs9kI26rmXVtxdWWS1k37WnXURkmUGsRSlUO5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1788324946; x=1788411346; bh=cG8aQogDk6usIqBs+ny9I88KV5fGWMX2sJq DExHiBL0=; b=VnJCRfvJYdU9GDWa0/f/W3nHVlJkVYihfXmHr9yhy6B062jtQ9A nDXOxz5QKFmEBvL78PpRAcOFUq1MJEzqV4lpwuz3rARD21iKCNHJgVMKYspEl7qZ PbGA+yHWCNMFI+I5nqK9UF+K8D9mAZOTCxSc4/CBABVW6CqvrcSKBDBW0simYES/ O5CqBLUOBU51DIgienvEM3xIh+i2FGWz51KWZcC5n9q/D8+jRN+Iv9AXX1gBMkVs WYl3zDRFoLZXjyPa1eQAmk3kLQ3jQ15Au/N19lW5ldFHx1tiVnHiwQmtCe/qrddy hFA+Un2bjZmDDzd14aVyRzvB7p7hO7zdOow== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTE15I2Qx2GZcedV28006fNUIUzFjFiIOEKvHpbcue66YRg6n1QLgEYB0Vyts1BMb9 P7Y6Ungv7bFC6QCclJMXzjIQtnhOT/e+om58suwqmUEObuxneWa5Cxcel4laQ0Jkl1O9B2 48WbpTTMBYkKGCGEsBbu/lnRu6LkYCsMRULzzuacePNnI8sZ+j7V928wiBVSsZaUq6KsYV UVtQXE+vn1WZhll2EvgjeK4hm3fBUG9oxN/mtDI4ymcGeUAG4azauItpIJK6kHzcV4lu14 uAqA5FALH/2/Rj1pkerhidfDM6PFRbF4IdInxXjpFCt4AYG41EYDLP3a8GAHe661Bwr3lC cv90ngNnrlBw5SdWro6VNeVMLBBIZ19aHtg3/zt+DW1lcASZLnyhbEZGS5cLstYQgQFMfh L2JeUZmQ5JCRXa9uS+5yLCzHl8nJarC4ouF0IkVxt3KfJL3uUjOjVT7qgmL5pJ3esZDAHG C3lba55F5ZzWlEwQC/exeSw8OVgeC9nbPvyHNOixISaHwK9flKc+9sGvGsywqu+KMY9xGk dELtMvsD6U14E4/glvr7xzuW+ScTZWmIXnmwy9tF0M55/Xagez4SVvxIjD9T4f5TKQJ98F OLQnYYqFF9lPmi4uVkH1R/0EtigwrzKSPpD6sgJIBF8eXq/1QQuP4rByxsyg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 2 Sep 2026 00:55:44 -0400 (EDT) Date: Wed, 2 Sep 2026 13:55:38 +0900 From: Michael Paquier To: Robert Haas Cc: Bharath Rupireddy , SATYANARAYANA NARLAPURAM , PostgreSQL Hackers Subject: Re: LockHasWaiters() crashes on fast-path locks Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Bm5OJACo8zOLH+kR" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Bm5OJACo8zOLH+kR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Sep 02, 2026 at 08:53:47AM +0900, Michael Paquier wrote: > Perhaps out-of-core code or extensions could make use of this API, but > in my experience this usually points at possible optimizations in the > backend core code. I'd suggest to look at that first, perhaps, if > you'd like to make LockHasWaiters() fast-path safe? Oh, I have missed the argument about autoprewarm and pg_prewarm on this thread: https://www.postgresql.org/message-id/CALj2ACXXx9TwYzeP0cRnZKHz60yOYivcG7yiV=2FTC5chSVoOg@mail.gmail.com Sorry about that. I'd be curious about a different case where this could be used. Without the other proposal this feels a bit dead when taken independently.. -- Michael --Bm5OJACo8zOLH+kR Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmqXrEoACgkQnvQgOdby QH0/lw/6A/bLNTwrzAnWieaK2j4yztfya/LIb1gk81+VMmIj8vSp7n6ZqBJLiG6U PRRBzkzpZyF7NursPUZa3Vc+iWU0F2TM/nQNsq6qTs1l6xkExELEwxVqqJF5ynUJ ZpVzGbDx8HNlTnXSqhw5NnL+VpbbyBMi8qKNr1mxIb0kYjFU5sFPSKfPif5a6sSv kXnyT8A9x8gdy5pmJ99AOG8pqpcPZ/hXKRsk55YHzm56yA2uYqq6/7tuIcAOaOsb uQEJY6TueBVQLwqUwQ2NIA13bwEZcFp+VFKjN0JpoU6ZTxh5zHdhVjXOJ+9QEDAS gZMKzvUBnVtl0acRcaoaIsA5ecabCFSMudae7oZvJYuDjQl8ik63oSQCKLgy4Kfz XDEzUQ3V+B8yDUWIatwCApGYaHT0d4YKwjhGw8fN6ub87aii4DHcq6iiRiEqu2e8 1vq5ky5xnOuYnTtNT7O7HbdoEmHFaEX3Mt2Zy2zLnTeeEbQmglgxP59w0dmEgcRy +tnn3BdzRfKdDXxE7xeFhDcYsFeEz6glZlrWgo2W6SL2Kr94YBSEBYupjAPhjSNw 1ZQNjuJGDPST5R/kQWi92qviPeY3ZF1W/mE9PGG1qhnbEyhc9s5K2P3uOVxywIhK DzQqEDBzhGQU3Hu0Di6GuNsc0zKmv/J/XcdQ7QFaWfP+p/u7h/U= =IoTd -----END PGP SIGNATURE----- --Bm5OJACo8zOLH+kR--