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 1vYUi7-0051e9-1L for pgsql-docs@arkaria.postgresql.org; Wed, 24 Dec 2025 19:39:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vYUh6-005RNS-0x for pgsql-docs@arkaria.postgresql.org; Wed, 24 Dec 2025 19:38:49 +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 1vYUh6-005RNB-0A for pgsql-docs@lists.postgresql.org; Wed, 24 Dec 2025 19:38:48 +0000 Received: from mail-yw1-x112c.google.com ([2607:f8b0:4864:20::112c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vYUh4-002ZJT-0L for pgsql-docs@lists.postgresql.org; Wed, 24 Dec 2025 19:38:48 +0000 Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-78fd6189c88so33126747b3.0 for ; Wed, 24 Dec 2025 11:38:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766605123; x=1767209923; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=FgE7IZMu3OpKjrAz5dA+jbJgCjs80gOLb6rrLL5o6xU=; b=Oh+rWjCJiTLboVftKHD8FNBNMgJuUd9oed4GwKj7BDyd+awnzq9D/zJmUe/9t9dN+w rONvhlFesKQbrVBfmD616cwEgHHSSyYexCS3jbA1O8y3u1d0IfX7Tr4WRZg4RACE29sF Y9LBgtNd1SPl1yZxkjdmrhYNv/Aqku86ZACPqG5nYk1tf9061ummGJGqfkIcraJn1rLA 5yW++m7SGsy0Mh/N2ZYNHKNZaqEMbwUNbWkB5fELwMvRqDJr6u2w3uUg05chnxdpCqpp zIBlH5C+weTe1TEaURJ01y0LFUts2sRkUMM6zA9i/76g9kQZbn1mX4iyvBvVcIwgGdLK //+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766605123; x=1767209923; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=FgE7IZMu3OpKjrAz5dA+jbJgCjs80gOLb6rrLL5o6xU=; b=uYdnOsPc2XNj07stFihGrfcteX31zbBA/NTnn++FbparaOMWI8StxE13+SP+d62gIb rpOK5KOEhH+FHIZX5dUXyu7dj6OD45uKXOjOutuUfoYphOSLKNMw1Y0XMqe+lrX9BOQl Qo0kvcIIVHmrFPt+Bgfnu9/BtM3b64vTCYx3GT/PyjGmmn57uMfu+zEOtsb76IYIrXjk ssdNJ6qouEdzUHrIpcMYWjMEPYSdN2T/4gPSmZi+PlwrjPO5Ey2sHaaQ0S5ah3zlTQYH Ngybnyx3ZF5kTQzZ5ysWx3GHiGWqEBeGO5L4fgagOF4ikKPHmVcV6UDlsYIKgu4N4oaE P/0A== X-Gm-Message-State: AOJu0YzGGu8YG2z24i729TvZtL98Z743DyF6NGaMYtQFCZPYGsBoqICo Hy1WSA1umZJSvt4RcI/ZteSbNfNsD4FCh0g29OpAz0Bot3/Zv97OtAIjO2bdnqAoNOXIkutriHL 5UVFb8t/xEJVVHl0+N4Wr1Y/BuUKsnIY= X-Gm-Gg: AY/fxX6Q0h/zfqmGdfTGR81Yng/4uYZXO67BziuIs8KBr3eu3sWnhlWFo8/dtPk8+aD GD6PasntjE1KTiFhy07KltOR4jCfBLawGlhYGfN6AFb+5C63tjOcBTmdc9YF78iwtz8fpteZBoc RZOH/oDA0qvMoYJU/XHfvWM0zCptwLE9HYjY/M5lCSgVpQc83ydnqNCgYHKFp/jQKwFOTkRFGrU SlPSk4Y6vHGLR9LIsEjI2U4KYnoBsekWw+/t7fmV/bp6RjB2VkIZozgtc1j5sPh4CpP01Iu85Id gGiChR6NcdHhQHgLQMhR X-Google-Smtp-Source: AGHT+IF1f17MIRvsF/4355TlojaBlomx7HRyLQgVr3Ncm74d/13MzQbLydNHTxNLt9nTa+zqV9+kcgdYgaUGpQ0HZEs= X-Received: by 2002:a53:ebc1:0:b0:644:444f:3bc2 with SMTP id 956f58d0204a3-6466a8b4bfemr12274023d50.22.1766605123371; Wed, 24 Dec 2025 11:38:43 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bernice Southey Date: Wed, 24 Dec 2025 19:38:07 +0000 X-Gm-Features: AQt7F2qVfCcfm3NP5YbSDWlp_2jPX6MYS6LRGOLv2T5aCJUlhDxvFn_6IYRNaWg Message-ID: Subject: Re: More guidance on ctid To: Bruce Momjian Cc: pgsql-docs@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Bruce Momjian wrote: > We could go in the direction you suggested, but it seems out-of-place in > the UPDATE/DELETE docs since it gets into a lot of details. Maybe in > the locking chapter? How about if the UPDATE and DELETE examples only show how to get limit and order by with a cte, and remove all references to locking. No for update, deadlocks etc. The examples use primary keys and not ctid. Anyone just trying to do simple limit and order by without locking problems will get what they need, and won't be confused by the locking complexity. Anyone trying to solve lock contention needs to understand locking and should be looking at that chapter. The explanation for deadlock avoidance should be there as you suggest. Perhaps the update and delete examples can link to them. If you think this is the right approach I'm willing to give it a go? Thanks, Bernice