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 1oJGIV-0008N5-GM for pgsql-general@arkaria.postgresql.org; Wed, 03 Aug 2022 15:28:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oJGIU-0001ui-Cr for pgsql-general@arkaria.postgresql.org; Wed, 03 Aug 2022 15:28:34 +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 1oJGIU-0001uZ-2F for pgsql-general@lists.postgresql.org; Wed, 03 Aug 2022 15:28:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oJGIN-0001sv-GF for pgsql-general@postgresql.org; Wed, 03 Aug 2022 15:28:33 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 273FSOVb3043714; Wed, 3 Aug 2022 11:28:24 -0400 From: Tom Lane To: Adrian Klaver cc: Kevin Martin , pgsql-general Subject: Re: "Missing" column in Postgres logical replication update message In-reply-to: <6713b9c2-8a57-26a9-94e1-636e838b033a@aklaver.com> References: <6713b9c2-8a57-26a9-94e1-636e838b033a@aklaver.com> Comments: In-reply-to Adrian Klaver message dated "Wed, 03 Aug 2022 08:12:45 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3043712.1659540504.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 03 Aug 2022 11:28:24 -0400 Message-ID: <3043713.1659540504@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Adrian Klaver writes: > On 8/3/22 08:09, Kevin Martin wrote: >> I thought that any UPDATE message in the replication logs is designed t= o = >> include all values for all columns.=C2=A0 Is that correct? Buried deep in the wire protocol specification is this bit: ---- The following message parts are shared by the above messages. TupleData Int16 Number of columns. Next, one of the following submessages appears for each column (except= generated columns): ... Byte1('u') Identifies unchanged TOASTed value (the actual value is not sent). ---- So that right there is two cases where we omit data for a column. I suspect the "unchanged toasted data" case is what matters for your purposes. Maybe you've found some code that fails to implement that correctly? regards, tom lane