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 1rOz9t-008Ung-LS for pgsql-bugs@arkaria.postgresql.org; Sun, 14 Jan 2024 12:00:10 +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 1rOz9s-00BVdb-Oz for pgsql-bugs@arkaria.postgresql.org; Sun, 14 Jan 2024 12:00:08 +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.94.2) (envelope-from ) id 1rOz9s-00BVdO-GC for pgsql-bugs@lists.postgresql.org; Sun, 14 Jan 2024 12:00:08 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rOz9p-001U8I-GS for pgsql-bugs@lists.postgresql.org; Sun, 14 Jan 2024 12:00:06 +0000 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-50e7af5f618so8724193e87.1 for ; Sun, 14 Jan 2024 04:00:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705233603; x=1705838403; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=cPoznVHHpx3x4WE+V+O6rEDpIOmi59BuTiyrelOkJLA=; b=Rt7yJnFW79/kpMTzKsi2fECsGDv/qIM6aOgqB+iceVd5w3H9cq5iyyntNmiQDCC55P LagwOPHWOlleP564xCed27VkkQXf+kdhRUuZf3sG1H2jtRMCxk4LI3zkFJDoeB9/bjxd 5xTxIRmvH3gRJ1gUwgjewZDcBp/s+h05FxG7lxUkHdKcr1VXK0bV2i1g/Ib6QNiQeo6V kub3mPl7ZbjukBduVB4OedUeCh0+DhUajVT0JEzCZmWqTsTZrDW3PIRvqQ9TqqnbIt5Z TC/UgJ9TAh08vny67bieH0PSoHf0IUtKo06jp3s6vcKxJ6lSooIy0wEINREHL6hu0OhF dGeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705233603; x=1705838403; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cPoznVHHpx3x4WE+V+O6rEDpIOmi59BuTiyrelOkJLA=; b=nWAtaNLe6aErfs9Je7dOvc8rx5eXB3u6L5I231JUE7vMYJ1OcgSPqZa4K0NkysZOVh lMmYMRjIYdE50QrAwwBPqeIBsTlJWzzi9qWoq7sHRyVLac9mEhXsu866i0OJzHN22A0C zgisuVxTWNpeDzcXsoXrL4T0jEzRCOQo6lPEWHixLKfQh+LAZcuIdaUJ+raF2jVp1tga E1lvVDRbSsZeMS4mtr+BmwZXqn1lUsta7MSH6/UP7zchhi3oRBVBdrd/P1RIEcQxbDck HTQEwD+4H3qG1w6A0xQFi/JdL/McWwNwjQ4tUOZ6W1h0ICMn3sVQ1OyxqWHoU5sw95h+ AgIQ== X-Gm-Message-State: AOJu0Yxqg+hC6fXGpSTS4ilOr8nxxLJADfJfrTxOWgTWmPJFAI0VqIst 9Utjg2ifLLG/xet3+JGs8vE= X-Google-Smtp-Source: AGHT+IHM1sdRrjKwCjoNmPqsH64rAAlSCiK4EVNr2qU1F4DJq1jlcLYMdzlKrmz4yXiIXmUj9n45fQ== X-Received: by 2002:a05:6512:3137:b0:50e:3d5b:cfef with SMTP id p23-20020a056512313700b0050e3d5bcfefmr1548894lfd.53.1705233602637; Sun, 14 Jan 2024 04:00:02 -0800 (PST) Received: from [1.0.0.7] ([91.185.77.50]) by smtp.gmail.com with ESMTPSA id q6-20020a056512210600b0050e80fe2ed0sm1133422lfr.8.2024.01.14.04.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 14 Jan 2024 04:00:01 -0800 (PST) Message-ID: Date: Sun, 14 Jan 2024 15:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: BUG #17798: Incorrect memory access occurs when using BEFORE ROW UPDATE trigger Content-Language: en-US To: Tom Lane , Robert Haas Cc: pgsql-bugs@lists.postgresql.org, Richard Guo , Andres Freund , Peter Geoghegan References: <17798-0907404928dcf0dd@postgresql.org> <1849610.1682807087@sss.pgh.pa.us> <494cd7c4-c109-6886-c0e3-138a95e7e38b@gmail.com> <74335d44-819d-60e0-859a-efe74d9c84c2@gmail.com> <325298.1705009396@sss.pgh.pa.us> <94ca869c-472b-f1cf-3d7c-aa8530f5475d@gmail.com> <17124cd9-6515-2076-6eac-40d44388f833@gmail.com> <492826.17050! ! 80506@sss.pgh.pa.us> <794095.1705092767@sss.pgh.pa.us> <1110148.1705188555@sss.pgh.pa.us> From: Alexander Lakhin In-Reply-To: <1110148.1705188555@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello Tom, 14.01.2024 02:29, Tom Lane wrote: > So, after a bit more work on the comments, I end with the attached. Thank you very much for the detailed explanation and for the final patch! I have no questions regarding the fix proposed. I've retested it with my demo test just to be sure and encountered no issues. Best regards, Alexander