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 1uYOgR-005UG6-GE for pgsql-general@arkaria.postgresql.org; Sun, 06 Jul 2025 12:41:27 +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 1uYOgN-00DGYb-Ik for pgsql-general@arkaria.postgresql.org; Sun, 06 Jul 2025 12:41:24 +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 1uYOgM-00DGYT-VT for pgsql-general@lists.postgresql.org; Sun, 06 Jul 2025 12:41:23 +0000 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uYOgL-0063Ub-0x for pgsql-general@postgresql.org; Sun, 06 Jul 2025 12:41:23 +0000 Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-60c4f796446so3238623a12.1 for ; Sun, 06 Jul 2025 05:41:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751805678; x=1752410478; darn=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=mLsERl36IWGUafDKYQostG2hQl8Ri9ThedlFmd+rehQ=; b=Uzn0pkrhdvmrdI/FXR5bXK5RJ45yQ+pRKKlHkPAM7RedCAtDamFssJxlRKF9e8JCtp ep4J3Tbt5Xf8kFmg+GJx23ixsifp/U6iXkH4g0FahMNMPyJBLv6V2u5SoQRnN2Vs0eSP xwHpQUwYTdYjjlt90Peq6ic1FMokZP5Y0mqSepduliB13cFYMtE5dLwhrAR3nSy7YF+e FX6ttcTYQN79Fl6pb0sQErEbNX34YX/WcHciLm6S01chi3NUmAaSNp55yh3h+A/y3Ca3 bFIX4v7kl6LgYXG6hw2huYZtkVpX6yMghdow30Irv+Lzq7JAFozl3IXoQ3bYgsGeV64a 69aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751805678; x=1752410478; 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=mLsERl36IWGUafDKYQostG2hQl8Ri9ThedlFmd+rehQ=; b=Dz9W8JKt1IIVnv7rMeXmaxMfF8dfKJZ4Vm+sHdVivK/5dSr3Rh4pdWLoOPImhmCuUu PqzFRd5EAEwm3x8H+C4F6zPUvS++ZfSAnl6gHukAqq+JIyPLJ5Tb8xPXcnQtkA1QBStM ecm5enCQNcFgHvLnK1dQzJKm66ns7IKsAmOnSeaNI0OhoqqxAxMPcMMob2WbCj1yNEUK eYXl226pmCEI0mFHnpiSoBt8TDSnc7CVi67KDqwCPHk1+9087Jm7HH5++BEbA07M1POC p3GfbA/1T6wQpCgDoDXMkr6r/DZEhJNHm1UVsjNjW4oo9tvYMwVMcYRjulAbdvUS+qLp +SFg== X-Gm-Message-State: AOJu0YwVi9bHZ09HjSInZv5kNTkHcMKuD1FKf1XzUVyQITmUtayRbVYn 99t4TC5Oh/Qf18KOXkM0f4ac8olXt4Kr+MrU4EtxIdtV6qmowuEzvrWaX15s4Tv97qXgyTEKn6V 7L6nkP7V4Ow00P0rOK69j6XOTHbe7oSuVVy+Q X-Gm-Gg: ASbGncuWbhh0pl65LQik8a2k9f6UEQ8TsTGRNHbrjiXCGrbVLfeTdXdoBn5ZEt913F5 FH6VxXRcIdlhhzkxVMUGBumthV8683vX2ZkqRLE82Ahp7nb9puVfYrQgFTmwO5cusY/wOuY6AIo pHy8TEfLZXWXo8zIWtLqDdWVPK1SI6w7fBRRwhzGzk6UcJ X-Google-Smtp-Source: AGHT+IECTIowhJJSn74iLKs0cwECgkIa/fNjWM/gXOI934pMw5piUtRlBoAY/Wg11Ywo8XbMNi4JXgqrVVxdIE6Od7A= X-Received: by 2002:a17:906:6a03:b0:ae0:da2d:44b9 with SMTP id a640c23a62f3a-ae4107731b6mr513115466b.7.1751805677739; Sun, 06 Jul 2025 05:41:17 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Soni M Date: Sun, 6 Jul 2025 19:41:06 +0700 X-Gm-Features: Ac12FXy-66QJ8uOci2XRgctmhMhTiTaE6eT0d2d-hmWN9gtWgg0cX1ybyQF4OC4 Message-ID: Subject: Re: Logical Replication 08P01 invalid memory alloc request size 1095736448 To: pgsql-general@postgresql.org Content-Type: multipart/alternative; boundary="0000000000002322ff0639420ba4" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000002322ff0639420ba4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Some updates : Checking at lsn_diff from 33D44/EF3219B0 to 33D45/373C2D98, pg_wal_lsn_diff ----------------- 1208620008 which is quite different to memory alloc request 1095736448. Digging deeper into debug messages : DEBUG,00000,"find_in_dynamic_libpath: trying ""/usr/pgsql-15/lib/libpqwalreceiver""",,,,,,,,,"","logical replication worker",,0 DEBUG,00000,"find_in_dynamic_libpath: trying ""/usr/pgsql-15/lib/libpqwalreceiver.so""",,,,,,,,,"","logical replication worker",,0 DEBUG,00000,"InitPostgres",,,,,,,,,"","logical replication worker",,0 DEBUG,00000,"my backend ID is 3",,,,,,,,,"","logical replication worker",,0 DEBUG,00000,"StartTransaction(1) name: unnamed; blockState: DEFAULT; state: INPROGRESS, xid/subid/cid: 0/1/0",,,,,,,,,"","logical replication worker",,= 0 DEBUG,00000,"CommitTransaction(1) name: unnamed; blockState: STARTED; state: INPROGRESS, xid/subid/cid: 0/1/0",,,,,,,,,"","logical replication worker",,0 DEBUG,00000,"StartTransaction(1) name: unnamed; blockState: DEFAULT; state: INPROGRESS, xid/subid/cid: 0/1/0",,,,,,,,,"","logical replication worker",,= 0 LOG,00000,"logical replication apply worker for subscription ""consprod_subscription"" has started",,,,,,,,,"","logical replication worker",,0 DEBUG,00000,"CommitTransaction(1) name: unnamed; blockState: STARTED; state: INPROGRESS, xid/subid/cid: 0/1/0",,,,,,,,,"","logical replication worker",,0 DEBUG,00000,"connecting to publisher using connection string ""host=3D10.2.5.43 port=3D5432 user=3Dreplicator dbname=3Dconsprod""",,,,,,,,,"","logical replication worker",,0 DEBUG,00000,"StartTransaction(1) name: unnamed; blockState: DEFAULT; state: INPROGRESS, xid/subid/cid: 0/1/0",,,,,,,,,"","logical replication worker",,= 0 DEBUG,00000,"CommitTransaction(1) name: unnamed; blockState: STARTED; state: INPROGRESS, xid/subid/cid: 0/1/0",,,,,,,,,"","logical replication worker",,0 DEBUG,00000,"logical replication apply worker for subscription ""consprod_subscription"" two_phase is DISABLED",,,,,,,,,"","logical replication worker",,0 DEBUG,00000,"sending feedback (force 0) to recv 33D45/373C2D98, write 33D45/373C2D98, flush 33D45/373C2D98",,,,,,,,,"","logical replication worker",,0 DEBUG,00000,"StartTransaction(1) name: unnamed; blockState: DEFAULT; state: INPROGRESS, xid/subid/cid: 0/1/0",,,,,,,,,"","logical replication worker",,= 0 DEBUG,00000,"CommitTransaction(1) name: unnamed; blockState: STARTED; state: INPROGRESS, xid/subid/cid: 0/1/0",,,,,,,,,"","logical replication worker",,0 DEBUG,00000,"sending feedback (force 0) to recv 33D45/373C2D98, write 33D45/373C2D98, flush 33D45/373C2D98",,,,,,,,,"","logical replication worker",,0 ERROR,08P01,"could not receive data from WAL stream: ERROR: invalid memory alloc request size 1095736448",,,,,,,,,"","logical replication worker",,0 DEBUG,00000,"shmem_exit(1): 5 before_shmem_exit callbacks to make",,,,,,,,,"","logical replication worker",,0 DEBUG,00000,"shmem_exit(1): 7 on_shmem_exit callbacks to make",,,,,,,,,"","logical replication worker",,0 DEBUG,00000,"proc_exit(1): 1 callbacks to make",,,,,,,,,"","logical replication worker",,0 DEBUG,00000,"exit(1)",,,,,,,,,"","logical replication worker",,0 DEBUG,00000,"shmem_exit(-1): 0 before_shmem_exit callbacks to make",,,,,,,,,"","logical replication worker",,0 DEBUG,00000,"shmem_exit(-1): 0 on_shmem_exit callbacks to make",,,,,,,,,"","logical replication worker",,0 DEBUG,00000,"proc_exit(-1): 0 callbacks to make",,,,,,,,,"","logical replication worker",,0 LOG,00000,"background worker ""logical replication worker"" (PID 62160) exited with exit code 1",,,,,,,,,"","postmaster",,0 Please help On Sun, Jul 6, 2025 at 4:40=E2=80=AFPM Soni M wrote: > Hello All, > we have this set up : > Postgres 15.13 on RHEL 9.6 > > Logical Master also have 2 streaming replica > Logical Replica also have 1 streaming replica > > We just do patch updates from 15.12 to 15.13, restart Logical Master and > then Logical Replica, and suddenly Logical replication stops working. > Streaming replication of both are fine. > > The message on Logical Replica : > ERROR,08P01,"could not receive data from WAL stream: ERROR: invalid > memory alloc request size 1095736448",,,,,,,,,"","logical replication > worker",,0 > > The message on Logical Master : > "START_REPLICATION", LOG,00000,"starting logical decoding for slot > ""_subscription""","Streaming transactions committing after 33D45/373C2D9= 8, > reading WAL from 33D44/EF3219B0.",,,,,"START_REPLICATION SLOT > ""_subscription"" LOGICAL 33D45/373C2D98 (proto_version '3', > publication_names '""_publication""')",,,"_subscription","walsender",,0 > > "START_REPLICATION", ,LOG,00000,"logical decoding found consistent point > at 33D44/EF3219B0","Logical decoding will begin using saved > snapshot.",,,,,"START_REPLICATION SLOT ""_subscription"" LOGICAL > 33D45/373C2D98 (proto_version '3', publication_names > '""_publication""')",,,"_subscription","walsender",,0 > > Checking at error code 08P01 is protocol_violation. > > Is there any idea on what causing this and how to resolve ? > > -- > Regards, > > Soni Maula Harriz > --=20 Regards, Soni Maula Harriz --0000000000002322ff0639420ba4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Some updates :
Checking at lsn_diff from 33D44/EF3219B0= to 33D45/373C2D98,=C2=A0
=C2=A0pg_wal_lsn_diff
-----------------=C2=A0 =C2=A0 =C2=A0 1208620008
which is quite different to memory allo= c request 1095736448.

Digging deeper into debug messages :

DE= BUG,00000,"find_in_dynamic_libpath: trying ""/usr/pgsql-15/l= ib/libpqwalreceiver""",,,,,,,,,"","logical re= plication worker",,0
DEBUG,00000,"find_in_dynamic_libpath: try= ing ""/usr/pgsql-15/lib/libpqwalreceiver.so""",,,,= ,,,,,"","logical replication worker",,0
DEBUG,00000,= "InitPostgres",,,,,,,,,"","logical replication wor= ker",,0
DEBUG,00000,"my backend ID is 3",,,,,,,,,"&q= uot;,"logical replication worker",,0
DEBUG,00000,"StartTr= ansaction(1) name: unnamed; blockState: DEFAULT; state: INPROGRESS, xid/sub= id/cid: 0/1/0",,,,,,,,,"","logical replication worker&q= uot;,,0
DEBUG,00000,"CommitTransaction(1) name: unnamed; blockState= : STARTED; state: INPROGRESS, xid/subid/cid: 0/1/0",,,,,,,,,"&quo= t;,"logical replication worker",,0
DEBUG,00000,"StartTran= saction(1) name: unnamed; blockState: DEFAULT; state: INPROGRESS, xid/subid= /cid: 0/1/0",,,,,,,,,"","logical replication worker&quo= t;,,0
LOG,00000,"logical replication apply worker for subscription = ""consprod_subscription"" has started",,,,,,,,,&qu= ot;","logical replication worker",,0
DEBUG,00000,"Co= mmitTransaction(1) name: unnamed; blockState: STARTED; state: INPROGRESS, x= id/subid/cid: 0/1/0",,,,,,,,,"","logical replication wo= rker",,0
DEBUG,00000,"connecting to publisher using connection= string ""host=3D10.2.5.43 port=3D5432 user=3Dreplicator dbname= =3Dconsprod""",,,,,,,,,"","logical replicatio= n worker",,0
DEBUG,00000,"StartTransaction(1) name: unnamed; b= lockState: DEFAULT; state: INPROGRESS, xid/subid/cid: 0/1/0",,,,,,,,,&= quot;","logical replication worker",,0
DEBUG,00000,"= CommitTransaction(1) name: unnamed; blockState: STARTED; state: INPROGRESS,= xid/subid/cid: 0/1/0",,,,,,,,,"","logical replication = worker",,0
DEBUG,00000,"logical replication apply worker for s= ubscription ""consprod_subscription"" two_phase is DISA= BLED",,,,,,,,,"","logical replication worker",,0DEBUG,00000,"sending feedback (force 0) to recv 33D45/373C2D98, writ= e 33D45/373C2D98, flush 33D45/373C2D98",,,,,,,,,"","log= ical replication worker",,0
DEBUG,00000,"StartTransaction(1) n= ame: unnamed; blockState: DEFAULT; state: INPROGRESS, xid/subid/cid: 0/1/0&= quot;,,,,,,,,,"","logical replication worker",,0
DEB= UG,00000,"CommitTransaction(1) name: unnamed; blockState: STARTED; sta= te: INPROGRESS, xid/subid/cid: 0/1/0",,,,,,,,,"","logic= al replication worker",,0
DEBUG,00000,"sending feedback (force= 0) to recv 33D45/373C2D98, write 33D45/373C2D98, flush 33D45/373C2D98"= ;,,,,,,,,,"","logical replication worker",,0
ERROR,0= 8P01,"could not receive data from WAL stream: ERROR: =C2=A0invalid mem= ory alloc request size 1095736448",,,,,,,,,"","logical = replication worker",,0
DEBUG,00000,"shmem_exit(1): 5 before_sh= mem_exit callbacks to make",,,,,,,,,"","logical replica= tion worker",,0
DEBUG,00000,"shmem_exit(1): 7 on_shmem_exit ca= llbacks to make",,,,,,,,,"","logical replication worker= ",,0
DEBUG,00000,"proc_exit(1): 1 callbacks to make",,,,,= ,,,,"","logical replication worker",,0
DEBUG,00000,&= quot;exit(1)",,,,,,,,,"","logical replication worker&qu= ot;,,0
DEBUG,00000,"shmem_exit(-1): 0 before_shmem_exit callbacks t= o make",,,,,,,,,"","logical replication worker",,0=
DEBUG,00000,"shmem_exit(-1): 0 on_shmem_exit callbacks to make&quo= t;,,,,,,,,,"","logical replication worker",,0
DEBUG,= 00000,"proc_exit(-1): 0 callbacks to make",,,,,,,,,"",&= quot;logical replication worker",,0
LOG,00000,"background work= er ""logical replication worker"" (PID 62160) exited wi= th exit code 1",,,,,,,,,"","postmaster",,0

= Please help



--
Regards,

Soni Maula Har= riz
--0000000000002322ff0639420ba4--