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.98.2) (envelope-from ) id 1xDIsX-00000000R04-42wI for pgsql-bugs@arkaria.postgresql.org; Sun, 04 Oct 2026 09:51:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xDIsW-00000004XiO-0usp for pgsql-bugs@arkaria.postgresql.org; Sun, 04 Oct 2026 09:51:32 +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.98.2) (envelope-from ) id 1xDIsV-00000004XiG-3XaJ for pgsql-bugs@lists.postgresql.org; Sun, 04 Oct 2026 09:51:31 +0000 Received: from mail-dy2-x0d.google.com ([2607:f8b0:4864:36::d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1xDIsU-00000000IBg-0Rqo for pgsql-bugs@lists.postgresql.org; Sun, 04 Oct 2026 09:51:30 +0000 Received: by mail-dy2-x0d.google.com with SMTP id 5a478bee46e88-34daf1b9a1fso534392eec.2 for ; Sun, 04 Oct 2026 02:51:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1791107489; x=1791712289; darn=lists.postgresql.org; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:content-type:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=j4tji+02MrOA0R4wibn5t52UmLTZqd1LQCDJL25hENA=; b=fZy233StJGo41WWX/eXpRW+oLRzthliXu0J+KAZqKevo8a4g8j13SO9jEUWdVxaF20 lmWahu4OpCtHsmCQbcC1QEGNRLooYJsElfki3sks/ItRsJxeqmVrR4OPFnrp+pw6FUpj DjnCT+W+rjd0NUnp7zghXTauXD4l4mhzMRd8oksziWqF1ldRBxN/6Q15z+ghm8B9QTv5 9eWyqTOUgatPlMHue3FQLmoNHT91FemYzwvbSulLqFyOulgfgZVcgmTzKkCugWM7/hsf nKl1hRGoFfpFXotY7zfnDNJXaTsURP+yYJA96y69s2C73AoentaawY8cQ32vmK/kolP1 kjpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791107489; x=1791712289; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:content-type:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=j4tji+02MrOA0R4wibn5t52UmLTZqd1LQCDJL25hENA=; b=jYGxeqOmBIA9HGLZUedXydA6d/6vrLknU+UvzMrJypr1wqQN/siueBsRdFJAf8z6JQ +3I/asd93PyXfIyHDCUGJstMXE3t5PgcuGrz1t+Y1bfzJ9PhcjuuBHOVaUMb3xaVnGBL uyfkHAJUhlJYIhjbRzVDs4nK4a1lp1lHvqxvrmZBrRlmfJVnwASJrfK1a95CIWJPlIyL urroX029Xyze3VWxtev6ZBa8QsJqLD6jLJG3sGIDeVQtUj4NiQ5yLEsJ9ak8sdV8a+uy 6KnSOPwKlN+JgrXdefhSwr9emUsM4lN38n0Yc2Sk71HI6Lrk06kqvGhShtYegzwdaNIS D/RQ== X-Forwarded-Encrypted: i=1; AKwUvBww8hprtjDMnXvvnjsejk4ipatzomtSGDEKXq3Z4UdgQaumzYIhSDOnDqjDS/7Bcjz45ZvrhpV0m1FQ@lists.postgresql.org X-Gm-Message-State: AFq9FYImWzXTumCgUAtx2YzR23LZMGSYKl6G1cwr2aRnOs7f/864EhBK 7kW6K7X/O0yFkDXPqgBM3W2U2QMue7LHFPXt9PSqUM4NWFsfd6cQl7+xeYwR7MMZ X-Gm-Gg: AYBFou0tE8mMWaSynLv6msDCh5VXZYhjrtu5+0EykB82k8Oj6WUXfg9j5QBnkWwB9iF jmjBIHNKB6VCTdaRAqwC99wNhFJr5BNvvCLU/02lHOwNdCILCqFFwo6BsYvf8C7wHRxrGsx5NNo bE9yEurANH2FI7SuVs4WU1MBXY4NyAYA9QdTZ15dGvBCyKjDai/RAjJOWPpc7pTWoU9vtxgK5Ib Y68XVlYfVbEjec+Volds5kwSijSfqMPVM8aKciU/bLFE+9+ALN4e4QFEKpjex5EENpUH/qjC6Hk Q8uzZlpXDiUop9XBR5UAM5k/VUqwpeGv5M243TuqITWWEdjpoN4jQ8kgyCYMvJAGy0kJYnAYvvU nGfsUo7bop/7/lEs/rRp4QHmzFkY9pPSqRr6eAKIkdHtm2/qEH4MQj7j0YAt3sPEMNgrLiit5pA EyhsiKk4M5QQumfzoRBp+KJzZrUt/whfQSvT3ihWXQt6EeEZ0MvxNZSK28zyYkXPIc9H7/0blod yRtOehuNxxcR1sNCUo= X-Received: by 2002:a05:7300:c00e:10b0:34c:c0b3:8aca with SMTP id 5a478bee46e88-34f15091ccfmr10526372eec.10.1791107488249; Sun, 04 Oct 2026 02:51:28 -0700 (PDT) Received: from smtpclient.apple ([92.223.30.25]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-35127021d1esm4023879eec.4.2026.10.04.02.51.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Oct 2026 02:51:27 -0700 (PDT) From: weijie JL Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3901.100.1.1.12\)) Subject: Re: BUG #19725: PostgreSQL 18.6: pg_restore read failure with io_uring, not observed with worker Date: Sun, 4 Oct 2026 17:51:14 +0800 References: <19725-a209093fc33dfb3e@postgresql.org> To: weijie1006jl@gmail.com, pgsql-bugs@lists.postgresql.org In-Reply-To: <19725-a209093fc33dfb3e@postgresql.org> Message-Id: <2C1F5CFC-B46F-4578-B930-1C413B5851FB@gmail.com> X-Mailer: Apple Mail (2.3901.100.1.1.12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk After setting backtrace_functions=3Dmd_readv_report, I received more log = information: 2026-10-04 17:46:08.322 CST [local] test001 postgres [154450]LOG: = XX000: could not read blocks 143..158 in file "base/6406098/6407866": = Operation canceled 2026-10-04 17:46:08.322 CST [local] test001 postgres [154450]LOCATION: = md_readv_report, md.c:2059 2026-10-04 17:46:08.322 CST [local] test001 postgres [154450]BACKTRACE: =20= postgres: postgres test001 [local] CREATE INDEX() [0x92eafc] postgres: postgres test001 [local] CREATE INDEX() [0x92f7ec] postgres: postgres test001 [local] CREATE = INDEX(pgaio_io_call_complete_shared+0xfa) [0x8ef3ea] postgres: postgres test001 [local] CREATE INDEX() [0x8f209c] postgres: postgres test001 [local] CREATE INDEX() [0x8f2b63] postgres: postgres test001 [local] CREATE INDEX() [0x8f0127] postgres: postgres test001 [local] CREATE = INDEX(WaitReadBuffers+0x1f7) [0x8f5137] postgres: postgres test001 [local] CREATE = INDEX(read_stream_next_buffer+0x211) [0x8f6ac1] postgres: postgres test001 [local] CREATE INDEX() [0x5874d6] postgres: postgres test001 [local] CREATE = INDEX(heap_getnext+0x88) [0x5878e8] postgres: postgres test001 [local] CREATE INDEX() [0x58dcbd] postgres: postgres test001 [local] CREATE INDEX() [0x5b11ae] postgres: postgres test001 [local] CREATE INDEX(btbuild+0xb05) = [0x5b7325] postgres: postgres test001 [local] CREATE = INDEX(index_build+0x19c) [0x61fa2c] postgres: postgres test001 [local] CREATE = INDEX(index_create+0x1328) [0x621608] postgres: postgres test001 [local] CREATE = INDEX(DefineIndex+0x9bb) [0x6d11cb] postgres: postgres test001 [local] CREATE INDEX() [0xb18111] postgres: postgres test001 [local] CREATE = INDEX(standard_ProcessUtility+0x3f8) [0x93c1d8] /usr/pgsql-18/lib/pg_stat_statements.so(+0x7375) = [0x7f209b366375] postgres: postgres test001 [local] CREATE INDEX() [0x93cc3a] postgres: postgres test001 [local] CREATE INDEX() [0x93cdaf] postgres: postgres test001 [local] CREATE INDEX(PortalRun+0x291) = [0x93d371] postgres: postgres test001 [local] CREATE INDEX() [0x935ab0] postgres: postgres test001 [local] CREATE = INDEX(PostgresMain+0x1f1b) [0x937f6b] postgres: postgres test001 [local] CREATE INDEX() [0x9389d5] postgres: postgres test001 [local] CREATE = INDEX(postmaster_child_launch+0x12d) [0x888ced] postgres: postgres test001 [local] CREATE INDEX() [0x891cb2] postgres: postgres test001 [local] CREATE = INDEX(PostmasterMain+0xce9) [0x894309] postgres: postgres test001 [local] CREATE INDEX(main+0x1d0) = [0x531bc0] /lib64/libc.so.6(+0x2a610) [0x7f209b82a610] /lib64/libc.so.6(__libc_start_main+0x80) [0x7f209b82a6c0] postgres: postgres test001 [local] CREATE INDEX(_start+0x25) = [0x5321b5] 2026-10-04 17:46:08.322 CST [local] test001 postgres [154450]STATEMENT: = CREATE INDEX idx_sys_notification_channel_notification_id ON = dhr.sys_notification_channel USING btree (c_notification_id); =20 =20 =20 > 2026=E5=B9=B49=E6=9C=8828=E6=97=A5 11:34=EF=BC=8CPG Bug reporting form = =E5=86=99=E9=81=93=EF=BC=9A >=20 > The following bug has been logged on the website: >=20 > Bug reference: 19725 > Logged by: weijie JL > Email address: weijie1006jl@gmail.com > PostgreSQL version: 18.6 > Operating system: RockyLinux9 > Description: =20 >=20 > Hello, >=20 > I can reproduce a read failure during pg_restore with = io_method=3Dio_uring. > The error disappears with worker and recurs after switching back to > io_uring. >=20 > Environment: > - PostgreSQL 18.6, x86_64 > - VMware VM: 8 vCPUs, 32 GB RAM > - Kernel: 5.14.0-611.55.1.el9_7.x86_64 >=20 > Settings: > effective_io_concurrency =3D 256 > maintenance_io_concurrency =3D 16 > max_parallel_maintenance_workers =3D 2 >=20 > Restore command: > nohup pg_restore -d test001 dhr.dump/ -j8 -v > test.log 2>&1 & >=20 > One failing statement: > ALTER TABLE ONLY dhr.obj_permission_object > ADD CONSTRAINT obj_permission_object_pkey PRIMARY KEY (id); >=20 > Server error: > ERROR: could not read blocks 143..158 in file "base/1684908/1686127": > Operation canceled > LOCATION: md_readv_report, md.c:2059 > SQLSTATE: XX000 >=20 > Observed test sequence: > 1. io_method=3Dio_uring: the read error occurred during index = creation. > 2. Changed io_method to worker: retried without errors. > 3. Changed io_method back to io_uring: the read error was reproduced. >=20 > I have not measured the failure rate or prepared a self-contained > minimal reproducer. >=20 > One earlier run also reported "could not map dynamic shared memory > segment" from parallel workers immediately after the read error. > Those DSM errors have not recurred in subsequent failing tests. >=20 > Does this match a known PostgreSQL bug or kernel-side io_uring issue? > What additional logs or tracing would help identify the cause? >=20 > Thank you. >=20 >=20