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.94.2) (envelope-from ) id 1u6iQC-003Gbz-2E for pgsql-bugs@arkaria.postgresql.org; Mon, 21 Apr 2025 04:06:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u6iQ9-000x1S-9I for pgsql-bugs@arkaria.postgresql.org; Mon, 21 Apr 2025 04:06:14 +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.94.2) (envelope-from ) id 1u6iQ8-000x13-Md for pgsql-bugs@lists.postgresql.org; Mon, 21 Apr 2025 04:06:13 +0000 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u6iQ5-001AGb-1A for pgsql-bugs@lists.postgresql.org; Mon, 21 Apr 2025 04:06:12 +0000 Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-af579e46b5dso2292585a12.3 for ; Sun, 20 Apr 2025 21:06:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1745208368; x=1745813168; darn=lists.postgresql.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=rW3ueEFk0PgeW5xPEFPsGL4Tl1vMtWTCyEJsPgW2UrY=; b=HbV2vzYX/5/qeht6D/X/5TzjJH220any82KJEiqcc6r2tPx3z+FxnVEHw50IolZCT7 sCFR2rbqwf5NS+zq59TqBMMSrH+Vhl2WaZsWRqHJ1DotWBbmsAdLaskJ3R8sOvn+8ADK WwhjKjv6N6Zf4CVXATeDECoY5vIsmMtA10IhM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745208368; x=1745813168; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rW3ueEFk0PgeW5xPEFPsGL4Tl1vMtWTCyEJsPgW2UrY=; b=clA85RivipWhvGea7r5CaYWCbtSG0AEfi26M/ofM0vBY/nf5zgCjVpiBQ969PdPYRx 3KJRa1uyXg1ZfsSqYmaJ2BdxHh+e4RMp1XJSS/41XUM9+EA9hF6Y+QvhPJsdMTjVfamS a/enK4KKm9UTpY6b2xsMbieyoQhe3u+Rz+vefc1YIr4mov5Bsj26kYxO4jlJ71McMgCZ xEssoL63eG1ltYi6ppmYvCzC3i2mD5Vsm2x5vgSOh6rQqlGlNSXciA5rdI73sP6WbnUq r4ut8WqyKyuYvZPVw94MeZ1fArdKe5JzhIxM3EF4I41oVSlhjTgAtEzXRb3B/rZuLhcV PIug== X-Forwarded-Encrypted: i=1; AJvYcCXOXbB0SkDv6SHZIJWeUiMou3p0TShlNZsWkn6wIzddPS6QHavXFzrJeSGg9jYuMXP6VYcRkvWQtv/T@lists.postgresql.org X-Gm-Message-State: AOJu0Yy3sWdRYp6Q5zq6RM79PtVJtACjJEuEAx/3Fr0hYBtA1wsXTDni tu++fYMtp/i+MVw0WJZZrgzgDSERM68hilazBJWg0nmrnmGHoG/B5nko8Kc54Q== X-Gm-Gg: ASbGnctMBWc1btt+pFC1HJbF0P09/2QHPUF+f7m947jcn0w3F3PwkeUXy6K7b6rmUav XVmZYhmQO2QLkt4acdAgjeXiSCC5Sqey6UqJ1/T3BPXxMawPrrNRMOP9s5fEi/LjoBX1SbLQNAC q6CNp555d8uUw1VN24oibDHhe0lttFobDbMm9kpEjqDk8l87SbB2WEzC5+YuqpSClchedSQp4gl Evkfz0OLD84thP3ieXKL1gg73nQjzP+W3BkDVTFPNvZRhPQBSObGrSg6bz1r9X0TZJuh9ZLICuN pmdo+y/kN+buZ9XTutOtlv/ryJdWR1P8zJZc9w== X-Google-Smtp-Source: AGHT+IFotL3XkfdN6tOWHa3+GqXIOYMozbfq0uF6tdmkok9yDUpTVLtkrV+QCyx3X6mEB5CQ55ULjw== X-Received: by 2002:a05:6a20:d70b:b0:203:bb3b:5f03 with SMTP id adf61e73a8af0-203cbc09185mr14690252637.6.1745208368021; Sun, 20 Apr 2025 21:06:08 -0700 (PDT) Received: from google.com ([2601:647:5600:80d0::31cd]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b0db13cb3b5sm4777103a12.38.2025.04.20.21.06.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Apr 2025 21:06:07 -0700 (PDT) Date: Sun, 20 Apr 2025 21:06:05 -0700 From: Noah Misch To: Robins Tharakan Cc: Richard Guo , PostgreSQL mailing lists Subject: Re: ERROR: tuple to be updated was already modified by an operation triggered by the current command Message-ID: <20250421040605.f4.nmisch@google.com> References: <20250411144133.d5.nmisch@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250411144133.d5.nmisch@google.com> User-Agent: Mutt/2.2.12 (2023-09-09) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Apr 11, 2025 at 07:41:33AM -0700, Noah Misch wrote: > On Fri, Apr 11, 2025 at 10:18:04PM +0930, Robins Tharakan wrote: > > On Thu, 23 Jan 2025 at 19:42, Richard Guo wrote: > > > Repro SQL > > ========= > > CREATE TEMPORARY TABLE a(b boolean , UNIQUE(b)) ON COMMIT DELETE ROWS ; > > CREATE TEMP TABLE d() INHERITS(a) ON COMMIT DROP ; > > ANALYSE; > --- a/src/backend/commands/vacuum.c > +++ b/src/backend/commands/vacuum.c > @@ -657,6 +657,8 @@ vacuum(List *relations, VacuumParams *params, BufferAccessStrategy bstrategy, > if (use_own_xacts) > { > PopActiveSnapshot(); > + /* standard_ProcessUtility() does CCI if !use_own_xacts */ > + CommandCounterIncrement(); > CommitTransactionCommand(); Pushed: postgr.es/c/2d5350c