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 1vkwmh-004uyn-2N for pgsql-general@arkaria.postgresql.org; Wed, 28 Jan 2026 04:04:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vkwmf-00HBaO-1B for pgsql-general@arkaria.postgresql.org; Wed, 28 Jan 2026 04:04:01 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vkwmf-00HBaF-03 for pgsql-general@lists.postgresql.org; Wed, 28 Jan 2026 04:04:01 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vkwmc-002fsE-1s for pgsql-general@lists.postgresql.org; Wed, 28 Jan 2026 04:04:00 +0000 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-2a09d981507so2907535ad.1 for ; Tue, 27 Jan 2026 20:03:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1769573038; cv=none; d=google.com; s=arc-20240605; b=SRNl8LiAZOz9tHkv0G8a+Jbu2jic1L3ovsaG2QFidlFH+oJcznURNPzMrDQ5Y4fFxG iZ7XVdmeVY9b37RUHyB7FOmKL3r5gyF7rYtsPS8F7vrwANwFvkrflq4P6bViXSUrP+Ht JeTWJXYlXOpGQ1PtoKCmTHb2e7aME67N+YE/xiuzCiGJZo/zp6doJYHn8a1kd1G4r6dn bssG5kfzT4LMcY859Snq4WraDIJMGl87ilO+n9sdoc6eZp4mNzAzBNc0txaTm+cseQ2s Hnq0yQGiBOMv46pLwr3awZDgOBDPiVmoLEFH/SrWqwZ7IfOU/2w1K9pjrmwFv1UEpo6J zt7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=UPn4RULRngvQ8hpgxRlEt+QCv2MzX3l5ZYtKvXCeO+M=; fh=RaxhazXFG/kyjYRUVsu/GHuDkxByuwiQjqMZwy3iZkY=; b=AyUJjyYX/3gI9F4HMbZdqVOeds6Jt1DBPkrxDkGvJ3UHrJnTlIIVCFpUzG1qsba3Pr fINBjYMWSiq2Ch52G9zT05tGT8IUH/UzQaf4XzZL27hZLhyREoM9NsWM0c2Tvlw8/gVU ChqfGr+w9YNsTzrRoLAY+VVu6EYksQW5h1XO6Q4dAwH2XQzku9eOepMDiRHD7d6iQFpl zfivGIAAD+U2N4EtfCajiB92j96Sfh5mWrRFvN/FletJ6UPF+3p585RHeY1qQmtUmDwt PLMsNkF469jXWNUrarY8PcV/WbQstPOoaB+P6/IFYqcnS5Wo4BjrHYKXcUADiN1QcLmW Rl3g==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769573038; x=1770177838; 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=UPn4RULRngvQ8hpgxRlEt+QCv2MzX3l5ZYtKvXCeO+M=; b=XA3ahJEWJdB01szfjiTwdwJ0Mi729XB1+RfldLBip7fMYoyXuwPppcKufSgkXjSjMb lruzB2G3hIqMt3pcpEjA2PcqbMxEZoNusLTNPDhuY5yHaJE8HjLlpqeGUH+XXyIR2qHh jkZhB03nvmPecEFbOPBJRZiMcfWyUrn6RPwJAavtGp7j4YoOnRav+de5A8GS5kzCWaf4 ERk/b6X7OPJheLiN2Byt4gROVAl+qZoFo/L8G00VXok9oGlmlk54GwcwTVzUi2bEzpze Iex0kJrQLl4hbQNoUkUwpGAziNX74Oi/vC7tDn+pIR98aQHl7swtC6trLy6yK1xV7f/p YOCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769573038; x=1770177838; 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=UPn4RULRngvQ8hpgxRlEt+QCv2MzX3l5ZYtKvXCeO+M=; b=Iy/q5ezcMJsfMXKSscE1BBQ1UBcd6suFX3aArpTWiJLm7EgmBaDzbkKcmB0KKh6jvq MacDAmTqGzYpIhDXAV1KEbNMX+hKIal4/ZaGVeed2b6U+tHaz/DC4TomYEYOnMQIfTCt PUn3nP/usF6Gmzc+AG+3NGGrlse2SV9nicXZoJv4ldKQlfwfJJQkURk1qAoyhmTicn8n RaB+UgvKJPEmvtnymDLJSxLUupIrXaGOHb9RIb01PXFeP4EwbHk8MSGPr5fUyL1nnT0x VmLKNE6QXk1RcQE3Z6dK5GBerLerDuvlBTr5wFTprSj8PKQnbeUGEaCH+XV6bd0UWvHB HocA== X-Forwarded-Encrypted: i=1; AJvYcCWrhP1dcqe4xvhYL1mVzGG9pgTeow2LJg/thTNwqvvQ0vqVCqZbqGi5htbCIv5bFRvpwcVE4RVEmhZFerIU@lists.postgresql.org X-Gm-Message-State: AOJu0YxgfI4FFtFU1srliTPMr97HUJvc7vg5yVRqrbr3y98UKaOqbm2s 0brRgUzuYtY93lJuxvruEppg91rp/2eTh8v/WOV/72/XkXfP1pLFkJ75OeY/NbnM3TICNojNu/h hThbeaZxRw0Rzh1WltQSAtCV4Oa1QTlg= X-Gm-Gg: AZuq6aJXpiG9tG6LRsHvq7ICEXRFab2JHnqp7iGoxJ1ZISb+BJ3E/vzvCCMrp1ujZEM XI2+J5hs+dsEq5TcORZs3pQTT9r9gh0YZ9kx5yDNx/JdPz4YcfelT+nDPeIgafC90SVg9t2/FiB wWYwBHTZhs/1/tBp9GTiwW3jaJCUKoNZsV+B2TqzzC2YuBU1H9nd78363EBQha00+bHoeUaLmfJ 5+wsOh+aPPcthKuUgVjGWnwm277zAASKxWz8EBq6Gl0MMEIKw1vJ6pgyTTImHtSY6r+yHdPKc9T GwNjSqw= X-Received: by 2002:a17:903:228c:b0:2a7:a87a:423 with SMTP id d9443c01a7336-2a8713237b3mr34941185ad.19.1769573038008; Tue, 27 Jan 2026 20:03:58 -0800 (PST) MIME-Version: 1.0 References: <729685.1769572320@sss.pgh.pa.us> In-Reply-To: <729685.1769572320@sss.pgh.pa.us> From: Ron Johnson Date: Tue, 27 Jan 2026 23:03:46 -0500 X-Gm-Features: AZwV_QjUEv6Z7dDPntL6MpFK_l7Cqze1Zvmbbgg5bXK7S3wYYpc6DVJhoKY204c Message-ID: Subject: Re: Attempting to delete excess rows from table with BATCH DELETE To: Tom Lane Cc: "David G. Johnston" , Gus Spier , pgsql-general Content-Type: multipart/alternative; boundary="00000000000055af8406496ad44e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000055af8406496ad44e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jan 27, 2026 at 10:52=E2=80=AFPM Tom Lane wrote= : > "David G. Johnston" writes: > > On Tuesday, January 27, 2026, Gus Spier wrote: > >> I write a procedure to accomplish all this work but it persists in > >> returning a error to the effect that a COMMIT is not valid in a block > >> tht tries to DELETE data. > > > Haven=E2=80=99t tested to be sure but this doesn=E2=80=99t seem like a = community edition > > limitation. > > Yeah, you can definitely do that in standard Postgres (at least since > we invented procedures). Hmm. Must have been START TRANSACTION which I remember causing issues in D= O blocks. --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --00000000000055af8406496ad44e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Jan 27, 2026 at 10:52=E2=80=AFPM = Tom Lane <tgl@sss.pgh.pa.us>= wrote:
"David G. Johnston" <david.g.johnsto= n@gmail.com> writes:
> On Tuesday, January 27, 2026, Gus Spier <gus.spier@gmail.com> wrote:
>> I write a procedure to accomplish all this work but it persists in=
>> returning a error to the effect that a COMMIT is not valid in a bl= ock
>> tht tries to DELETE data.

> Haven=E2=80=99t tested to be sure but this doesn=E2=80=99t seem like a= community edition
> limitation.

Yeah, you can definitely do that in standard Postgres (at least since
we invented procedures).

Hmm.=C2=A0 Must ha= ve been=C2=A0START TRANSACTION=C2=A0which I remember causing issues in=C2=A0DO=C2=A0blocks.=

--
Death to &= lt;Redacted>, and butter sauce.
Don't boil me, I'm still ali= ve.
<Redacted> lobster!
--00000000000055af8406496ad44e--