pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: weijie JL <weijie1006jl@gmail.com>
To: weijie1006jl@gmail.com
To: pgsql-bugs@lists.postgresql.org
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
Message-ID: <2C1F5CFC-B46F-4578-B930-1C413B5851FB@gmail.com> (raw)
In-Reply-To: <19725-a209093fc33dfb3e@postgresql.org>
References: <19725-a209093fc33dfb3e@postgresql.org>

After setting backtrace_functions=md_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:  
        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);
        
        
        


> 2026年9月28日 11:34,PG Bug reporting form <noreply@postgresql.org> 写道:
> 
> The following bug has been logged on the website:
> 
> Bug reference:      19725
> Logged by:          weijie JL
> Email address:      weijie1006jl@gmail.com
> PostgreSQL version: 18.6
> Operating system:   RockyLinux9
> Description:        
> 
> Hello,
> 
> I can reproduce a read failure during pg_restore with io_method=io_uring.
> The error disappears with worker and recurs after switching back to
> io_uring.
> 
> Environment:
> - PostgreSQL 18.6, x86_64
> - VMware VM: 8 vCPUs, 32 GB RAM
> - Kernel: 5.14.0-611.55.1.el9_7.x86_64
> 
> Settings:
> effective_io_concurrency = 256
> maintenance_io_concurrency = 16
> max_parallel_maintenance_workers = 2
> 
> Restore command:
> nohup pg_restore -d test001 dhr.dump/ -j8 -v > test.log 2>&1 &
> 
> One failing statement:
> ALTER TABLE ONLY dhr.obj_permission_object
>    ADD CONSTRAINT obj_permission_object_pkey PRIMARY KEY (id);
> 
> 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
> 
> Observed test sequence:
> 1. io_method=io_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.
> 
> I have not measured the failure rate or prepared a self-contained
> minimal reproducer.
> 
> 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.
> 
> Does this match a known PostgreSQL bug or kernel-side io_uring issue?
> What additional logs or tracing would help identify the cause?
> 
> Thank you.
> 
> 







view thread (7+ messages)  latest in thread

Message-ID: <2C1F5CFC-B46F-4578-B930-1C413B5851FB@gmail.com>
Permalink:  ../2C1F5CFC-B46F-4578-B930-1C413B5851FB@gmail.com/
Also on:    postgresql.org/message-id/2C1F5CFC-B46F-4578-B930-1C413B5851FB@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: weijie1006jl@gmail.com
  Subject: Re: BUG #19725: PostgreSQL 18.6: pg_restore read failure with io_uring, not observed with worker
  In-Reply-To: <2C1F5CFC-B46F-4578-B930-1C413B5851FB@gmail.com>
  References: <19725-a209093fc33dfb3e@postgresql.org> <2C1F5CFC-B46F-4578-B930-1C413B5851FB@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox