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.96) (envelope-from ) id 1wklUC-000rSy-1d for pgsql-bugs@arkaria.postgresql.org; Fri, 17 Jul 2026 16:32:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wklUB-001BTY-1A for pgsql-bugs@arkaria.postgresql.org; Fri, 17 Jul 2026 16:32:27 +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.96) (envelope-from ) id 1wkc0T-00G78P-2W for pgsql-bugs@lists.postgresql.org; Fri, 17 Jul 2026 06:25:10 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wkc0Q-00000000iXh-3a3y for pgsql-bugs@lists.postgresql.org; Fri, 17 Jul 2026 06:25:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:Cc:From:To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:Sender:Content-ID: Content-Description:In-Reply-To:References; bh=RFre4crcBB126xD0Eonz0zmhMBm5KTViD01ZQLxaGHo=; b=t9R9esubHAGGPXuBYtmXhxrZfQ nQF633ZJps6G4oFQuR5GM6Fa9MmaDnOjjReP6k4aTvADNpKGR3z+Njh/E5n06bk87I6tvA+9PDE2r 08eDA+N6yL/vOGCZsrNOtAWm6EMf3zsxaTpJ29PJlNfVm4oP2xxjXJ1NDLgMOru12wgawBhSGzR2L BIwl+vUa/g2ZljMcwaYM7LuBmMZ+OV7/Q+/IXymUCGELlgIOSf46LSDr3ykF/UHc2XSSVkrBvUpwB SSiy2zY1EwU3JkUlYU5rCbvnuFCd/2poh3NwPa+t8+HGhxbb9gDjj0dm9efWpvD2Ai4Bq6Naz/uDc zWPwiinA==; Received: from wrigleys.postgresql.org ([2a02:16a8:dc51::60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wkc0N-001t95-1t for pgsql-bugs@lists.postgresql.org; Fri, 17 Jul 2026 06:25:05 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wkc0L-004QEz-1g for pgsql-bugs@lists.postgresql.org; Fri, 17 Jul 2026 06:25:02 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #19556: Segmentation fault in test_decoding To: pgsql-bugs@lists.postgresql.org From: PG Bug reporting form Cc: a.kozhemyakin@postgrespro.ru Reply-To: a.kozhemyakin@postgrespro.ru, pgsql-bugs@lists.postgresql.org Date: Fri, 17 Jul 2026 06:24:34 +0000 Message-ID: <19556-daa6d7ea65054d48@postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk The following bug has been logged on the website: Bug reference: 19556 Logged by: Alexander Kozhemyakin Email address: a.kozhemyakin@postgrespro.ru PostgreSQL version: 19beta2 Operating system: ubuntu 26.04 Description: =20 Hi, The following script causes the server to crash with a Segmentation fault. initdb -D data echo " max_prepared_transactions =3D '15' wal_level =3D logical " >> data/postgresql.auto.conf pg_ctl -D data -l logfile start psql <skip_empty_xacts && !txndata->xact_wrote_changes) (gdb) bt #0 0x0000749f6ee23f54 in pg_decode_prepare_txn (ctx=3D0x6344c3d7f3f0, txn=3D0x6344c3d7d320, prepare_lsn=3D24628632) at /pgpro/postgres/contrib/test_decoding/test_decoding.c:378 #1 0x00006344a8e8293c in prepare_cb_wrapper (cache=3D, txn=3D, prepare_lsn=3D) at /pgpro/postgres/src/backend/replication/logical/logical.c:985 #2 0x00006344a8e90c24 in ReorderBufferPrepare (rb=3D0x6344c3cd9e10, xid=3Dxid@entry=3D745, gid=3Dgid@entry=3D0x7ffcb3620ef4 "p1") at /pgpro/postgres/src/backend/replication/logical/reorderbuffer.c:2934 #3 0x00006344a8e7fa26 in DecodePrepare (ctx=3D0x6344c3d7f3f0, buf=3D0x7ffcb3621030, parsed=3D0x7ffcb3620ea0) at /pgpro/postgres/src/backend/replication/logical/decode.c:815 #4 xact_decode (ctx=3D0x6344c3d7f3f0, buf=3D0x7ffcb3621030) at /pgpro/postgres/src/backend/replication/logical/decode.c:347 #5 0x00006344a8e7f223 in LogicalDecodingProcessRecord (ctx=3Dctx@entry=3D0x6344c3d7f3f0, record=3D0x6344c3d7f788) at /pgpro/postgres/src/backend/replication/logical/decode.c:116 #6 0x00006344a8e8577b in pg_logical_slot_get_changes_guts (fcinfo=3D0x6344c3d83410, confirm=3Dconfirm@entry=3Dtrue, binary=3Dbinary@entry=3Dfalse) at /pgpro/postgres/src/backend/replication/logical/logicalfuncs.c:266 #7 0x00006344a8e858f4 in pg_logical_slot_get_changes (fcinfo=3D) at /pgpro/postgres/src/backend/replication/logical/logicalfuncs.c:333 #8 0x00006344a8d3666d in ExecMakeTableFunctionResult (setexpr=3D0x6344c3d5ffc8, econtext=3D0x6344c3d5fe18, argContext=3D, expectedDesc=3D0x6344c3d49868, randomAccess=3Dfalse) at /pgpro/postgres/src/backend/executor/execSRF.c:234 #9 0x00006344a8d4a14b in FunctionNext (node=3Dnode@entry=3D0x6344c3d5fc08)= at /pgpro/postgres/src/backend/executor/nodeFunctionscan.c:94 #10 0x00006344a8d36f4c in ExecScanFetch (node=3D, epqstate=3D, accessMtd=3D, recheckMtd=3D) at /pgpro/postgres/src/include/executor/execScan.h:126 #11 ExecScanExtended (node=3D, accessMtd=3D0x6344a8d49e10 , recheckMtd=3D0x6344a8d49e00 , epqstate=3D0= x0, qual=3D0x0, projInfo=3D0x6344c3d49ea8) at /pgpro/postgres/src/include/executor/execScan.h:187 #12 ExecScan (node=3D0x6344c3d5fc08, accessMtd=3D0x6344a8d49e10 , recheckMtd=3D0x6344a8d49e00 ) at /pgpro/postgres/src/backend/executor/execScan.c:59 #13 0x00006344a8d2c17b in ExecProcNode (node=3D0x6344c3d5fc08) at /pgpro/postgres/src/include/executor/executor.h:272 #14 ExecutePlan (queryDesc=3D0x6344c3cd55d0, operation=3DCMD_SELECT, sendTuples=3Dtrue, numberTuples=3D0, direction=3D, dest=3D0x6344c3d8b7b8) at /pgpro/postgres/src/backend/executor/execMain.c:1= 675 #15 standard_ExecutorRun (queryDesc=3D0x6344c3cd55d0, direction=3D, count=3D0) at /pgpro/postgres/src/backend/executor/execMain.c:364 #16 0x00006344a8f11478 in PortalRunSelect (portal=3Dportal@entry=3D0x6344c3d018b0, forward=3Dforward@entry=3Dtrue, co= unt=3D0, count@entry=3D9223372036854775807, dest=3Ddest@entry=3D0x6344c3d8b7b8) at /pgpro/postgres/src/backend/tcop/pquery.c:920 #17 0x00006344a8f12c5e in PortalRun (portal=3Dportal@entry=3D0x6344c3d018b0, count=3Dcount@entry=3D9223372036854775807, isTopLevel=3DisTopLevel@entry=3D= true, dest=3Ddest@entry=3D0x6344c3d8b7b8, altdest=3Daltdest@entry=3D0x6344c3d8b7b= 8, qc=3Dqc@entry=3D0x7ffcb3621640) at /pgpro/postgres/src/backend/tcop/pquery.c:764 #18 0x00006344a8f0e95e in exec_simple_query (query_string=3D0x6344c3c80f60 "SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');") at /pgpro/postgres/src/backend/tcop/postgres.c:1271 #19 0x00006344a8f103e5 in PostgresMain (dbname=3D, username=3D) at /pgpro/postgres/src/backend/tcop/postgres.c:4691 #20 0x00006344a8f0aaa3 in BackendMain (startup_data=3D, startup_data_len=3D) at /pgpro/postgres/src/backend/tcop/backend_startup.c:107 #21 0x00006344a8e6184f in postmaster_child_launch (child_type=3D, child_slot=3D1, startup_data=3Dstartup_data@entry=3D0x7ffcb3621aec "", startup_data_len=3Dstartup_data_len@entry=3D4, client_sock=3Dclient_sock@entry=3D0x7ffcb3621af0) at /pgpro/postgres/src/backend/postmaster/launch_backend.c:274 #22 0x00006344a8e653ef in BackendStartup (client_sock=3D0x7ffcb3621af0) at /pgpro/postgres/src/backend/postmaster/postmaster.c:3519 #23 ServerLoop () at /pgpro/postgres/src/backend/postmaster/postmaster.c:1688 #24 0x00006344a8e66cbf in PostmasterMain (argc=3Dargc@entry=3D3, argv=3Dargv@entry=3D0x6344c3c7b440) at /pgpro/postgres/src/backend/postmaster/postmaster.c:1386 #25 0x00006344a8b3b35e in main (argc=3D3, argv=3D0x6344c3c7b440) at /pgpro/postgres/src/backend/main/main.c:230 first bad commit 072ee847ad4c3fb52