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 1vMmPM-001uVA-2h for pgsql-docs@arkaria.postgresql.org; Sat, 22 Nov 2025 12:08:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vMmPK-00BSxI-2H for pgsql-docs@arkaria.postgresql.org; Sat, 22 Nov 2025 12:08:03 +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 1vMmPK-00BSxA-1U for pgsql-docs@lists.postgresql.org; Sat, 22 Nov 2025 12:08:02 +0000 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vMmPI-000t8M-0B for pgsql-docs@lists.postgresql.org; Sat, 22 Nov 2025 12:08:02 +0000 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-b7373fba6d1so467869366b.3 for ; Sat, 22 Nov 2025 04:07:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1763813279; x=1764418079; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=HkPSM76B57q7BowHaf5WXG2fRY6Q35Sqz0sZ64uvVyM=; b=EOqPI1kdW82XbNUPKxLgdFFt29XOgs+Xgbm6XzVnQo82shbJLfh0B/p1GkvwMsz3xS C6uZUhLGKCQTGpiAggNoWzlceU5GKvPlPbFz87MulO/2yf8YCnTr4ny07EzSE1gXFQO0 gYrUAfqKFlijctYWrtjtkG9F4OEqnakvY12UskiZU+Kbr8WWyv9zXkniAHtSztgCUteq +W53BeSVNm+wrmlec5NsJfxUxlVzZq8nFgKkpz7J/SKmQM8w5oWNl1vFmOBeGaVo/7l1 ASz8izCbF1GX4KkTGjaRcsquKb3bK6E9JO6Qadx+uIep3UCL2tVM+G3f7T0Miw/cZ5QU IllA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763813279; x=1764418079; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HkPSM76B57q7BowHaf5WXG2fRY6Q35Sqz0sZ64uvVyM=; b=ineDqa7NWySF/NjqnBI41n53Y+OYS0KHlorz98mc44oaXSqzo4p3NxSDR0/KDIqzSl 63B9sdBUEFz+4GIFV+nEVCbezY6q6AqVhEsGYH5iEw6YbbnqolQCj6Digza4+u8Htiqp YDVyXlX6PdNwKdC7bNXuJdw9nSprnPlHADlB2w91bBmSOwoAmN92kDdMnXuIpffKB+Fd LTkmh6Yrlz3xlezz1EX2bdkeRmKhsBF2mHQOzF3/rYD3ccsiuJW37RBoXG/6yujdup9U EopwDdtVFgqCP9KMXsOzIh/lbcMje0WvANXPTOTPdv0BTwbWMQJ1qPCduTcNzNI2M7cp f/ug== X-Forwarded-Encrypted: i=1; AJvYcCVaXeyHPiGoTvWW1uktu6hGsEZCuTE1aLCyTjjBuFJfM7lFN+9Ws8B2L/CKZk/y8Q7n/JXVBfBqW9BT@lists.postgresql.org X-Gm-Message-State: AOJu0Yx4nw75nmZtJkwSEomApSi7F1+7ScUQXa21A/h6EbPWbTRtCoKp D/1nhwg2LrBCSDgxG82aDRrpn/A4kloaG3mCeuz+X0VpFONMKoZNMKxvEulX2dcCwaZDYUidWec uMcccR3s= X-Gm-Gg: ASbGncsmzSZtVQzKvISfBgSQ+kL63N0zyHTlmEHl5MzWYdOXFNEjaIy4KBEmHk0hCZB pEGPEtQBA23TEGk2IkgLrmZ8DnbRtqc0kH4tSR/yyFSxM2vd9dpzM59x0TCk6RPrTLG/ZfUWl4a 3lM4Pscl13KVHS5SWlvfAuBldSylMVQUttKDDeYqMofsO0kWmdUZ/7uuU4msTAb62J6IjzXwMuG En4cFynsOG+AguoefqCahlWdj4tetkp6kEzVGcvlN79EBvSrx/H1sB2L4HdwVGQRwh/yS7skYES afh52UoCV1loqsEoqz2GfWGCjwhJD8hji6sdNlIJTtrnrO6bqM7aIwVCnrRlGBVR7ZOPzX9YOQ/ rFLOdB3HsyadNVP9nNbZrvnYvStFw0FLfAQolWfbc+CUlw1gxfxACCnWZdPTwiur96GZjxFSOjr /EY8hcNx8Mdr4CH5AWHEIs+HGF+1v0BjRgLHvyt3N65RW5ZUuLRjk= X-Google-Smtp-Source: AGHT+IFZMOyvcfMIN3a2Av8g6NNLC1klhmbd0BD5uC2Bjw5/lhEaEWfc3C0ydmfECunzxecd+Isrmg== X-Received: by 2002:a17:907:86a7:b0:b73:51f3:a806 with SMTP id a640c23a62f3a-b7671af7159mr563660866b.51.1763813278772; Sat, 22 Nov 2025 04:07:58 -0800 (PST) Received: from laurenz.albe-K4N0CV00F97414D ([2001:871:270:1ce:374:d99c:26de:53b0]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b7654d56a70sm716092166b.22.2025.11.22.04.07.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Nov 2025 04:07:58 -0800 (PST) Message-ID: <58e8295701c9e15c251ed608c5ed297688c785a2.camel@cybertec.at> Subject: Re: (docs): add missing info about ShareLocks From: Laurenz Albe To: Alpha Shuro , pgsql-docs@lists.postgresql.org Date: Sat, 22 Nov 2025 13:07:57 +0100 In-Reply-To: <4274DCF3-177F-43D8-8547-90B8540B6619@gmail.com> References: <4274DCF3-177F-43D8-8547-90B8540B6619@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2 (3.56.2-2.fc42) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, 2025-11-22 at 09:07 +0100, Alpha Shuro wrote: > I had a production incident a few weeks ago while using deferred indexes,= where > the Postgres docs lead me down the wrong path of investigation due to mis= sing details. > Specifically, the docs implied that a `ShareLock` was only acquired when = creating > indexes, but only after looking at the code did I learn that this lock is= also > acquired when transactions are waiting for other transactions to complete= . > I think this would be helpful to someone who might find themselves on the= same path > in the future, and as I understand it this mailing list is the way to sub= mit patches > to the docs? No, that is wrong. This section is about table locks, and a lock on a tran= saction ID should, if anywhere, be documented elsewhere. Actually, there is already s= omething about transaction ID locks in https://www.postgresql.org/docs/current/xact-= locking.html Perhaps you could improve that short documentation? Yours, Laurenz Albe PS: There are also SHARE locks on rows.