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 1vMieM-0008Cl-1A for pgsql-docs@arkaria.postgresql.org; Sat, 22 Nov 2025 08:07:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vMieK-00AogF-32 for pgsql-docs@arkaria.postgresql.org; Sat, 22 Nov 2025 08:07:17 +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 1vMieK-00Aog7-2I for pgsql-docs@lists.postgresql.org; Sat, 22 Nov 2025 08:07:17 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vMieI-000rPk-2J for pgsql-docs@lists.postgresql.org; Sat, 22 Nov 2025 08:07:16 +0000 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-b737c6c13e1so505763266b.3 for ; Sat, 22 Nov 2025 00:07:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763798833; x=1764403633; darn=lists.postgresql.org; h=to:date:message-id:subject:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=iwK0iwxa4q8xn2NqNl36U3CQJvOii+KA9DdPkKpToEI=; b=EC94+k+6NWHe9qboSYQYtT+fF7VvDujHykmljilYDpCagVto79Cp+aWyS8cz6vy16k FJltoTtz6mjaCWZNWrlkGnTjrniiI+iWzlk6idU/UL3maCFxBAkK+nZNNOg7xQwGePF8 nWnD9XSOm9O08MiX3EgvAvl2ioBLxzBXyzr0LS4UkJkSZNx8sI3GjRSppq+m3t+N9ibZ io37QEewY6kPKuQeiEDbxNzCwLwuG2xfGJs1vA6oJqokWFQX+3BLZnEkilQDdfdiqADB QjSZhKxlNGrDuM5XRgtr4G7b50v/FJ3IE9GYa9sIg97UxDuCNPMcUKUhWGV7qkfGSnCI aVyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763798833; x=1764403633; h=to:date:message-id:subject:mime-version:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=iwK0iwxa4q8xn2NqNl36U3CQJvOii+KA9DdPkKpToEI=; b=vxitDwFywYlp783R+HZAe627P/F8mUi5nihxq7idwoapDPzOnEO3gevwmaqDSiSnn3 18l3AUibGlEIgRahgWIyt/FkQfZ8pngSUhCu5BZjaq3ro7HGXlbSpHKiLmuVZD7f/tm4 DDcaRM2piurrW0ySVAlPpoJEGbGpWbm0OwuoJa1jtYXf9qS9HvRIDa5vq7CIgtKPfL/R Kx3VaTKupvQMlHOT1m6fFz/6ppjE/vu5eeS5IJIZhf9MP14iizIu6ID6r1wGC2Mxc9Ig VZCwLeEw5mwCa8CT6HaI/gm/H0hFZGraKnlrsHh1sZ3ix471hpndzmKxdik7qTDJw/O7 2uDA== X-Gm-Message-State: AOJu0YyYQvwkhTYeExt4uQOdday6zG/nG5q80W75XjGb3ZOmDXEmglZU 00UktM8BNfkxeJiaMljjbtmt/dgHiRfn0L57MRLyR2etSjV+TdPMZ4ww5CaUx1zo X-Gm-Gg: ASbGncvMmDyl0azDpf58FcmU1ajYbmEw3m5mRCNRqYt3pRplZb3FfF3Ml1JZmy0sU4J drcN5KPv/DLc5SDvOGxZeXdjRSULyf+LAtAzpaskcj8fliidJ5Vv1IQ5bQEU0nw70Z7/IXR6KmG aBRExuNMgVI4sTl2OJ3m+zHZ9qlxchl3GDyxFd9+W7W/2bairYX2Fl9c7jnQdfexV/OI2wLLQO5 1Cpefls492iA/Ih0ooCogNdOd4IEhNnXslFigAd1cA/ltMelHwfEaqn5aYCGPKR8dxR/iGDvIpa C3J5qD0OrmbPd19C6lS5WXq5FzHRFg7vyLAZPW1YjsB4kenYmfrIdA39Q3uZ0khra6Y/6wWzGKw g9lvDp+11c7hN8etZiH/jGqgWM6cQPZkbUSkCY1ty+dANSxna+OBhyiCVu/cA9nn/49YFA/M19N YGQ3TmDsEoTcG++1A8es2qKAVHBF8OoQnQakyw79LfMK6scADs+4/a+3xiv6eYtNFhvnQGlcy44 QIgufNBIh5H88beRXC4NfLsjoZJhcExqg== X-Google-Smtp-Source: AGHT+IEFqFv7eo/Qw92kS1Tu2ZooKmFKwk0U4vy2rpJRIlSHxuKmccAtw2EVp43HtogA59nC6ddutQ== X-Received: by 2002:a17:907:da3:b0:b76:4c16:6b06 with SMTP id a640c23a62f3a-b767151c777mr568522466b.1.1763798832957; Sat, 22 Nov 2025 00:07:12 -0800 (PST) Received: from smtpclient.apple (2a06.4005.803e.0000.ac42.b694.a6a2.8191.static6.kviknet.net. [2a06:4005:803e:0:ac42:b694:a6a2:8191]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b7654d80665sm651599866b.31.2025.11.22.00.07.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Nov 2025 00:07:12 -0800 (PST) From: Alpha Shuro Content-Type: multipart/mixed; boundary="Apple-Mail=_46F6913A-B0C3-4D66-AF2D-B1E716BF8DE4" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: (docs): add missing info about ShareLocks Message-Id: <4274DCF3-177F-43D8-8547-90B8540B6619@gmail.com> Date: Sat, 22 Nov 2025 09:07:01 +0100 To: pgsql-docs@lists.postgresql.org X-Mailer: Apple Mail (2.3826.700.81) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_46F6913A-B0C3-4D66-AF2D-B1E716BF8DE4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hello 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 missing 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 submit patches to the docs? --Apple-Mail=_46F6913A-B0C3-4D66-AF2D-B1E716BF8DE4 Content-Disposition: attachment; filename=0001-document-ShareLock-behaviour-when-using-a-deferred-u.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-document-ShareLock-behaviour-when-using-a-deferred-u.patch" Content-Transfer-Encoding: quoted-printable =46rom=2080741b41d6ff09fdd395775f87b99098b589c16e=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Alpha=20Shuro=20=0ADate:=20= Wed,=2015=20Oct=202025=2017:55:05=20+0200=0ASubject:=20[PATCH]=20= document=20ShareLock=20behaviour=20when=20using=20a=20deferred=20unique=0A= =20index=0A=0AThe=20logs=20that=20were=20printed=20by=20Postgres=0Awhen=20= enforcing=20deferred=20unique=20indexes=20were=20misleading.=0A=0AThis=20= change=20should=20make=20it=20easier=20to=20understand=20or=20= investigate=0Awhen=20users=20see=20the=20`waits=20for=20ShareLock`=20log=20= entry=0A---=0A=20doc/src/sgml/mvcc.sgml=20|=205=20+++++=0A=201=20file=20= changed,=205=20insertions(+)=0A=0Adiff=20--git=20= a/doc/src/sgml/mvcc.sgml=20b/doc/src/sgml/mvcc.sgml=0Aindex=20= 049ee75a4ba..4e36c59776a=20100644=0A---=20a/doc/src/sgml/mvcc.sgml=0A+++=20= b/doc/src/sgml/mvcc.sgml=0A@@=20-1016,6=20+1016,11=20@@=20ERROR:=20=20= could=20not=20serialize=20access=20due=20to=20read/write=20dependencies=20= among=20transact=0A=20=20=20=20=20=20=20=20=20=0A=20=20=20=20=20=20= =20=20=20=20Acquired=20by=20CREATE=20INDEX=0A=20=20=20= =20=20=20=20=20=20=20(without=20).=0A+=0A+=20= =20=20=20=20=20=20=20=20It=20is=20also=20acquired=20when=20enforcing=20a=20= DEFERRED=20UNIQUE=20INDEX:=0A+=20=20=20=20=20=20=20=20=20If=20a=20= transaction=20detects=20another=20transaction=20that=20might=20cause=0A+=20= =20=20=20=20=20=20=20=20a=20potential=20conflict,=20it=20waits=20for=20= the=20other=20transaction=20to=20complete,=0A+=20=20=20=20=20=20=20=20=20= by=20acquiring=20a=20ShareLock=20on=20the=20other=20transaction's=20= transaction=20id.=0A=20=20=20=20=20=20=20=20=20=0A=20=20=20=20=20=20= =20=20=0A=20=20=20=20=20=20=20=0A--=20=0A= 2.51.0=0A=0A= --Apple-Mail=_46F6913A-B0C3-4D66-AF2D-B1E716BF8DE4--