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 1ukwIg-008wcc-Av for pgsql-general@arkaria.postgresql.org; Sun, 10 Aug 2025 03:00:46 +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 1ukwId-005uai-F7 for pgsql-general@arkaria.postgresql.org; Sun, 10 Aug 2025 03:00:43 +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 1ukwId-005uaa-48 for pgsql-general@lists.postgresql.org; Sun, 10 Aug 2025 03:00:43 +0000 Received: from mail-oa1-x34.google.com ([2001:4860:4864:20::34]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ukwIa-001iqv-2h for pgsql-general@lists.postgresql.org; Sun, 10 Aug 2025 03:00:42 +0000 Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-2cc89c59cc0so3213950fac.0 for ; Sat, 09 Aug 2025 20:00:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1754794839; x=1755399639; darn=lists.postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=QWCfFskbglNO2Ojn43dx5ozfsZE8sjWu6nzRIo3gu18=; b=Z5tljGg1I7Be4ZJeK98DkS0ke4GKixCQ5jrriNhW8Rk4c/+6uzkPEzJGOjkxgbu+YO WhJklPbv2jv/FWR9SINq03zqqWcXbesnxnUntXvvZwavwYW2zNjQmD29mu3nj56kyz7j IUlXxrTAg1hArwDva/BRF1sOT9UhDK3acGkofRZCmdEJwBxK8KtMH1l6ahRjEVO9fFnH 7LDenOH0gx5q6/FVIxdLZ9BoxXMM6U2EqIv/5Sut0nxCzJOMmScxTiifTg/bRoSSHKA4 YPzPpHgLnJRDLAJvaeOJSeocYfuSQSfdRN70g4bfml017y9WjjPoueTqzVzCtlR5kWr/ tODA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754794839; x=1755399639; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QWCfFskbglNO2Ojn43dx5ozfsZE8sjWu6nzRIo3gu18=; b=iKsE6e2y8osPe97yDEdowA7KIVb9wDcO55WO09difA5tYNp5mO5wvxRugPClx1NkQN H3JfhiZBOk7W1FIAJlwaQTLtX++V72+uDbELL8dFVsddkG0gQ5YBEKoM4sAAmPDWNEwk 79oLx5W5R4U1G511PhbP37093Nu3rMP0b6gH4i1Y8Hv1N+lTBNQDA80d7+ZmiodVwfeC bdZEG4rrIQDz+FiXusF9bOQaCLgr/4pXkKHTrurAVYLte2Wibg+1hpi9KgXorK2cKt5G jo9c/CuG0q5M0qx5Jv0I03KFCPDGbkyLVsCYpO75wqZmgL86f0XXZgr4/L1DpFD/shkm FCyQ== X-Gm-Message-State: AOJu0YzTp9WLAO6t8Y1m6Ge0KrQrEOQwlO2UBvxQiSp+RPSrJOEI3idE c+L3qjCIKs8qKC2oBBwAYEz8uv9PCfrd/41oQG61QXZYEX3M/Ga/OzH4OZUtfIP0AqPviO2nGAS j3F5WnumCxS89x/ZLh+od8uDtqTNQerejdGzX X-Gm-Gg: ASbGncsSTPAmm9k6l+yUfd+3iDFfdgDQqRc3N9o0qtdcqmf9m0MPV844j3eul9z8bIt 3h3KWzYblJZt6Cs+MvLGl0KAQqGIGBuC98QOY7+LbJethbwbV1VQhT8uSLlr511oWkcCkm5DGA2 Is4UuFYvI/Dzkf2nNrIoxF5eyM9TqXMTJdWfZ0jqr46KuDpC4tk6dqmO0olkOdh8iIjwZhNHBVi J1JC1Y= X-Google-Smtp-Source: AGHT+IE3sjf1DlM+GVFt0Z5nnvycB03vBZJOcSDruT+hHhskE8upP67Sd0zbsN2+ht4DLHei2CBYN8jfRFbzP5VHHfs= X-Received: by 2002:a05:6808:6a8e:b0:434:126d:407f with SMTP id 5614622812f47-43587d98e53mr8130594b6e.19.1754794838845; Sat, 09 Aug 2025 20:00:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Akashkiran Shivakumar Date: Sat, 9 Aug 2025 20:00:28 -0700 X-Gm-Features: Ac12FXyvlQLekLFcHji2FcH30s9ASXugPzwUON67XvPAVz0Jvf9qohdR-Nf10L4 Message-ID: Subject: Re: Can postgres replication slot using pgoutput release multiple CDC records for a single update to a particular row To: pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000005ef8e063bfa03d9" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000005ef8e063bfa03d9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Can someone take a look at this ? Any help would be appreciated Regards, Akashkiran On Tue, Jul 29, 2025 at 3:37=E2=80=AFPM Akashkiran Shivakumar < akashkiran.foss@gmail.com> wrote: > Hello, > I have a postgres database (major version 13) and am doing CDC by using a > replication slot with pgoutput. In our data lake, we see that there are > multiple updates (3 in this case) happening to the same row as part of th= e > same transaction. This doesn't make sense if we look at them as separate > updates. The expectation was that the row was updated once and a single C= DC > record was pushed out. I haven't completely ruled out whether multiple > updates happened in that transaction but I wanted to ask the community if > it is possible that a single update statement could spill over as multipl= e > CDC update records by pgoutput / postgres ? > > If yes, could you possibly point to the testcases or code where this migh= t > happen? Any blogs or suggestions are welcome. LMK if you need further > information > > P.S: Each update seen in the data lake changes at least one field in the > row. The entire row with all the columns are pushed out for the 3 updates > seen in the data lake. From the application perspective, it makes sense i= f > the 3 updates were merged into a single update record > > Regards, > Akashkiran > --00000000000005ef8e063bfa03d9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Can someone take a look at this ? Any hel= p would=C2=A0be appreciated

Regards,=C2=A0
Akashkiran
On Tue, Jul 29, 2025 at 3:37=E2=80=AFPM Akashkiran Shivaku= mar <akashkiran.foss@gmail.= com> wrote:
Hello,=C2=A0
I have a postgres database (major versi= on 13) and am doing CDC by using a replication slot with pgoutput. In our d= ata lake, we see that there are multiple updates (3 in this case) happening= to the same row as part of the same transaction. This doesn't make=C2= =A0sense if we look at them as separate updates. The expectation was that t= he row was updated once and a single CDC record was pushed out.=C2=A0=C2=A0= I haven't completely ruled out whether multiple updates happened in tha= t transaction but I wanted to ask the community if it is possible that a si= ngle update statement could spill over as multiple CDC update=C2=A0records= =C2=A0by pgoutput=C2=A0/ postgres=C2=A0?=C2=A0

If yes, could yo= u possibly point to the=C2=A0testcases or code where this might happen? Any= blogs or suggestions are welcome. LMK if you need further information
<= br>
P.S: Each update seen in the data lake changes at least one f= ield in the row. The entire row with all the columns are pushed out for the= 3 updates seen in the data lake. From the application perspective, it make= s sense if the 3 updates were merged into a single update record
Regards,
Akashkiran
--00000000000005ef8e063bfa03d9--