Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pH5oZ-0002Ev-2R for pgsql-hackers@arkaria.postgresql.org; Sun, 15 Jan 2023 16:24:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pH5oX-0001aV-TS for pgsql-hackers@arkaria.postgresql.org; Sun, 15 Jan 2023 16:24:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pH5oX-0001aM-Fr for pgsql-hackers@lists.postgresql.org; Sun, 15 Jan 2023 16:24:57 +0000 Received: from mail-qv1-xf35.google.com ([2607:f8b0:4864:20::f35]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pH5oS-0005A9-0t for pgsql-hackers@lists.postgresql.org; Sun, 15 Jan 2023 16:24:56 +0000 Received: by mail-qv1-xf35.google.com with SMTP id i12so18224813qvs.2 for ; Sun, 15 Jan 2023 08:24:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; 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=/H5olsH4EkJjAcP7FWnv/Y0lbOj1g03FYoXJmLX33yw=; b=PbcvbUqbTZfAEX078cFOybcFGw/GMv18kQXP6bEE8oSJ6c5MAIloc91Mb2SWR66E7w BePeFJbWagvcLFEsUCCmN4WlJorpw9ctW9B8aVoKaHWeSR6c+D5F1GkreIleXcqmoF56 LmfnXhHYaQh4+DlrQQxGq2dhgOE4A5CY1m69KtedCptvjMEyIJ1Tbv5Mvn3zgTWNE07d g7o7R9LIGdvd9iwj0oSwn254grUY6Ey7j+wbRPm4tTdKamSKqS1vCgKxILenDGjVGoDo 8Mwxpa7JP1Ubv4NegTGhCLVKnV6sMKmDyzCv2khmrKIT1+lhjLVpFtouzY6VPnegbWbf RTEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=/H5olsH4EkJjAcP7FWnv/Y0lbOj1g03FYoXJmLX33yw=; b=tlyhUaOqSNVt50g0RceY1vLL6JOuLCQFdDXaoscG7m5+v+jXKwTUapX8YTHAInYilc e3c1dpJdXuXtqA4DHMakOPSUr8/J6O+njww6338K8R9EuwQ+YaZkFRzkyUqKXMKbu7zw YHEmHInUUO8NhT8OgSVOBSNdArag6dD9JTXbpglI/Iu03FsBpaofDpsfRsE8z8OOIMcB E7xdhy0gT5nskk7rpK4EsgkrkZDweKOZ9q+PFZof2xP/NxGTCLMoLY+eDec5uohxWU4T SYPo8tqTfZ+JhCpskq4Znxj106o2FAenIM2/V+7gHFsknuAwLV/ZC/kPWJEGRGbwQtwX eUig== X-Gm-Message-State: AFqh2kqMt5GWTh8LmjUazbGut3As2wXIA3wRwdKj6XrdTk1c1+zRQOvE 1OQkmwDnA0b+eammx+cEt+CnLnyvgT1JA5qp X-Google-Smtp-Source: AMrXdXvghYYJZulpVs2ndul2/iGD0FngPaFQgR0cYuD9L17kErLqn59zBHcKIXdNJzifE/oGN5D/mg== X-Received: by 2002:a0c:becf:0:b0:4c7:498b:31c0 with SMTP id f15-20020a0cbecf000000b004c7498b31c0mr113804788qvj.19.1673799890975; Sun, 15 Jan 2023 08:24:50 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id o5-20020a05620a2a0500b006fcc437c2e8sm16792571qkp.44.2023.01.15.08.24.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 08:24:50 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 5F4D7800DCC; Sun, 15 Jan 2023 10:24:49 -0600 (CST) Date: Sun, 15 Jan 2023 10:24:49 -0600 From: Justin Pryzby To: v.davydov@postgrespro.ru Cc: pgsql-hackers@lists.postgresql.org, tgl@sss.pgh.pa.us Subject: Re: UPDATE operation terminates logical replication receiver process due to an assertion Message-ID: <20230115162449.GE9837@telsasoft.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Jan 12, 2023 at 01:23:57PM +0300, v.davydov@postgrespro.ru wrote: > Dear all, > > I think I've found a problem in logical replication that was introduced > recently in the patch: > > Fix calculation of which GENERATED columns need to be updated > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=3f7836ff651ad710fef52fa87b248ecdfc6468dc > There is an assertion which accidentally terminates logical replication > worker process. The assertion was introduced in the patch. To reproduce the > problem Postgres should be compiled with enabled assertions. The problem > appears when executing UPDATE operation on a non-empty table with GENERATED > columns and a BEFORE UPDATE trigger. The problem seems to appear on the > latest snapshots of 13 and 14 versions (sorry, I haven't tested other > versions). > > Stack: > ------ > TRAP: FailedAssertion("relinfo->ri_GeneratedExprs != NULL", File: "execUtils.c", Line: 1292) Yeah, confirmed under master branch and v15. Tom ? -- Justin