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.98.2) (envelope-from ) id 1x8sgM-00000001ZvS-2idv for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Sep 2026 05:04:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1x8sgK-0000000DZQ1-2mwT for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Sep 2026 05:04:40 +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.98.2) (envelope-from ) id 1x8sgK-0000000DZPs-1cX6 for pgsql-hackers@lists.postgresql.org; Tue, 22 Sep 2026 05:04:40 +0000 Received: from mail-wm2-x10.google.com ([2a00:1450:4864:31::10]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1x8sgH-00000000doy-2hUZ for pgsql-hackers@lists.postgresql.org; Tue, 22 Sep 2026 05:04:39 +0000 Received: by mail-wm2-x10.google.com with SMTP id 5b1f17b1804b1-49e620fa473so21962035e9.1 for ; Mon, 21 Sep 2026 22:04:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790053477; x=1790658277; darn=lists.postgresql.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=teWkJDm7w+sb9OJVae0oJYmEt7wVZUa+VKh8keF0Okw=; b=Hhm42EPUOdJYO3HT1gg34X9nDneouqRWZyb6mBhfm5lU9Q3+UU9x8inpBDGR1FziZn 2K5C536qoK26XU6NMAVe/0ohHH9ss0Y0d/mKW8vOf8o1uFXccOIPk77+7giVoTr2DhLb WYxynmRiQjPU+HMU8aL707DVBqMdNJtS9Iff4e8TFRiJLAxbF51jX3HdIAsYZcohIP1G RTt4zJPOWfFM4df81Nh5FE85cz/jEJ4sGQSTnI9t+kEeL2z48mjyU6Yb7v3a94X5Zbbu PYJ8d08oOhOtsztE1MCFfAlQ1aNGdblwVsI4r40LteNpaEUOC1IbsVCRRm7aYsEYd7hc 9dOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790053477; x=1790658277; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=teWkJDm7w+sb9OJVae0oJYmEt7wVZUa+VKh8keF0Okw=; b=zf4Z+FhYDu7Z5bOHyHP3OQB6uhGm1ty2GkO5LpD3Gho3dDdMMvOkkNbtMet5H/DdaS sC0P5OmDmibuMDgjzkJjT8qRrSe+FN4GWlp1V3j+sndPkJ6sCoQ2CO2FfWH/hMAcLYwH RmrH2fHvanJhJpBjobt2YwEbtiKIgGxoZJ4HQGP2K6gHZnKIqZ9H6c4iiI1miP3LX+LQ LigzQHY04qNN4kbjPGMeRbotMbT29WT7BSa3mz7pCH5oT6nFTbyiMnXsSPLTjQhHyztN v1q9JUUDujNe3g+FljQ9ktdcH2V/tFy6MCOHxHbG/Qeyp5twaTOqEG/W1WK+aK508o1T 9+2w== X-Gm-Message-State: AFuF++mJL3DtKLAPbG4g/KA/r2wRIQIa2aTNGLnaHLsLYW8NToX8k1Hb B1wcUUznbh0CgNf03c3Ult87v3QZGvTjbqIPin6Swh0vcw94seiVXG1Z X-Gm-Gg: AYBFou1Jmm+SuvLiUINaNLICPERksEG+sZd9klZsNmaLK3gZTNoAw6f58/PSXNkUhVE YME9prPIvc176ND4IdtTEJhowzJl/IuOsU6tyRYiKrKniDRIEbmxq6YEXTbVIn/S+JA1CxoHNyM XeIuMZOtKHJdsP2qiRuHbs0nUMM7YdmHwRz4DoYsgAPZwnYS3yeJ7N+j8ssFdHwlpNN/soHENuG B23PfcefYGH60IbjVYTZXwDVyeky9jKlR6anfInT3FIoIYBCA6OC5Oh1yx97usAymzdU6uET+As W2SbGZx0tzJ18C+16GSuwjjbsseXNqnHkPPisPPTGYO3ZVl+prUru4zBeOec4N+R7eJEwW+l1ho OVIDwDrSbhFNQRsjpRx6bIeXS1WhOIgf7RvyQyVgzu5CF4U91b8VQKzfLPy44hWqGK5p+ezqPPz F072DOApAyZ6zKE+NUETF6AoiUezTeSxYldoOmZHSHrnzOnONecEjzPkf5xdUI0uaaEbavdDisu 20zOkE60HG/PtqC5KUnzJQv2MsToew5Jw0lM555gDBJZPtppawB6M4rww== X-Received: by 2002:a05:600c:698d:b0:49c:fc6c:be06 with SMTP id 5b1f17b1804b1-49fc5851ea2mr172171345e9.29.1790053476403; Mon, 21 Sep 2026 22:04:36 -0700 (PDT) Received: from bdtpg (ec2-15-237-197-144.eu-west-3.compute.amazonaws.com. [15.237.197.144]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49fd8b97385sm47739825e9.2.2026.09.21.22.04.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Sep 2026 22:04:35 -0700 (PDT) Date: Tue, 22 Sep 2026 05:04:34 +0000 From: Bertrand Drouvot To: Kirill Reshke Cc: pgsql-hackers@lists.postgresql.org, Amit Kapila Subject: Re: Report relation extension blockers within parallel lock groups 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 Hi, On Fri, Sep 04, 2026 at 10:45:11AM +0500, Kirill Reshke wrote: > On Mon, 31 Aug 2026 at 07:39, Bertrand Drouvot > wrote: > > > > Hi hackers, > > > > While working on providing more informations related to locks (patch not shared > > yet), it appeared that pg_blocking_pids() can omit the process that is actually > > blocking a relation extension request. > > > > Indeed, commit 85f6b49c2c53 made relation extension locks conflict between members > > of the same parallel lock group, but did not update the same group filtering in > > pg_blocking_pids(). > > > > The attached adds the relation extension exception in pg_blocking_pids(). > > > > pg_blocking_pids() reports parallel workers using their lock group leader PID. > > Therefore, when one member of a parallel lock group blocks another, the PID > > supplied to pg_blocking_pids() can appear in the result. This does not mean > > that a process blocks itself. Rather, a lock held by one member of its parallel > > lock group blocks a lock request made by another member of that group. The patch > > documents this behavior. > > > Your fix looks correct to me, matches deadlock detector code. Thanks for looking at it! > > No regression test is added because ensuring relation extension lock contention > > between members of the same parallel lock group would be more complicated than > > needed for this simple patch. > > Isolation test you mean? Shouldn't be that hard using injection > points, but Anyway, I think I agree, too much cpu cycles will be > wasted on this small issue. Yeah, that does not seem worth it. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com