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 1wzcMX-0047Yy-0n for pgsql-bugs@arkaria.postgresql.org; Thu, 27 Aug 2026 15:49:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wzcMW-002t4b-0V for pgsql-bugs@arkaria.postgresql.org; Thu, 27 Aug 2026 15:49:56 +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.96) (envelope-from ) id 1wzcMV-002t4S-23 for pgsql-bugs@lists.postgresql.org; Thu, 27 Aug 2026 15:49:55 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wzcMT-00000002hnK-2DBG for pgsql-bugs@lists.postgresql.org; Thu, 27 Aug 2026 15:49:54 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-49954b88fffso19584615e9.0 for ; Thu, 27 Aug 2026 08:49:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787845792; x=1788450592; darn=lists.postgresql.org; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:content-type:from:to:cc :subject:date:message-id:reply-to:content-type; bh=qsvLJOrIk6rkQzlzVdbcamy9VuvjmSl5egYBHU1TUI4=; b=J5ZKyGZi/9j+ZX+jtxQ/Lql2xKQxUfFapaW0d5RiO/Eorp+9W0CF1DQg4/QJIwPi7M e0GOLrrEo0aqEmBcFFmrPvl4PKEgl6BWPKzSYUxgYzSv+xxRbubLABto0yES91xHsWf1 wqF7wPHNuZwpjdZx6rL9fD9pW+GxA62VWxKym4ISWzE2Dvz4DcSyYmM31TpjU2LGEl/V Ehgo2YuG7BZDV46reiWwhczj5sEmaUjMjGF5mJvYWC5y9qxnbVPLxftjnTefLze05CV+ +FRDoLYxywvTBMjC7dHACPqq81nRVWOyyqtjZYN3QmqwdH3cukuVzMrX6KqRHf9kLVsu ZiNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787845792; x=1788450592; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:content-type:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=qsvLJOrIk6rkQzlzVdbcamy9VuvjmSl5egYBHU1TUI4=; b=G8QOYKCbP4JyKZSvoz1B4mPgt/wDITQOxKMw6MIgvEQSvOhnOOsg3NWNUbT0+FCqWH 3D1rOzrrdcMtxBFyxAohXJr6FlrBefjcbB7WMOZRZFHJ2rJJcm4hJXgMyFL/fvowPcIx BBksPpmXddvyNCdETwRNi0N88OZVOZ+6+G4Zctu6oFTXAEq+K4nj1QVfK/yrWc713bjY bwAJBWwffRuS9LgiggtWLnP+JJe/aITBeyyKdSEEYna5rLXXvfdzav6AmTrW22J5x2Qc odJcdJ6mBriUOoE0i361nbtBT7q+dWWG8wXXvioYcNWmcGXW3fmU5JVzUQRGi3oN+Abr Wslg== X-Forwarded-Encrypted: i=1; AHgh+RoruK2f0TOwLdstssKkQ3YRjAfN5/4+8Hurhep8yl3eyp6rt+n+F56omdggVYXzy8NDiUeIOIrlnWbf@lists.postgresql.org X-Gm-Message-State: AFuF++ms+713opi/7N7X/i4mPWV1bwFl70aylWZGbWuDhGyBTFuHW/oD E9LxX1y3n4+u8RTW7+7/lhF2xUpQXvGUhn1bdHw/vRHcv24V0AW/lkAs X-Gm-Gg: AR+sD10b3YxHiR3SLYx60poGQKiF/4nQHXzUeQDC2cOgfSXuued84ANeoqLsvvKqlgS XviDrPPjDp+JUj2g9K3yUFpk6kpKgatbPOP0JUaVyDv6BTrZyMt8D4t/om5mLQs9yuiiHIt33Q1 vXffShUm56WIbNLmmICfxsol/jtVynlQyR7C+By9M7POGJS7ouYKccyGXFRt+C8JMrwkXXUKDUJ Yr3fIvpIXlMJVqQXyz8sSPmZ5Rp9peG7pBomupi7QOGjwljYdybhZe9znONXYIppzK7mCAYR8Cq I+CCZHxkdUea+ZmgckHMOIzMD0BB+5s24WkmO0qj2VgiBptUkaRnrU2E0C3GeKWoXoqC3IJ16G2 DRU+CZHH0BbNjlJJaxllO7IdzPqJNupZU41siaDmBxXz+H03zTWXWy+xWyQ+wnRn0xGQZebvocD u7sC1QO10G5QCr0JD+qa+1l/Kqq+Z3v0sUHEPrcL6ch/ZNDTrnderjGfGBKRl/3TRXviEffNILM ChBLolIsQ6TjSyo37DfdcsvMzncWlAvsJ3uyRAODXyYUpby2p+x X-Received: by 2002:a05:600c:4692:b0:499:ad2e:f7bc with SMTP id 5b1f17b1804b1-499dc717ea4mr175041945e9.10.1787845791802; Thu, 27 Aug 2026 08:49:51 -0700 (PDT) Received: from ?IPV6:2a01:e0a:bf8:b480:3190:53eb:f8aa:b610? ([2a01:e0a:bf8:b480:3190:53eb:f8aa:b610]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49b497fa9c5sm58594295e9.4.2026.08.27.08.49.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Aug 2026 08:49:51 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------kRKvFWwDH3bIvvyuwd0GyhMj" Message-ID: <85f24359-47b8-4d62-9fe1-4c29e1767db3@gmail.com> Date: Thu, 27 Aug 2026 17:49:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: BUG #19369: Not documented that io_uring on kernel versions between 5.1 and below 5.6 does not work To: surya poondla Cc: Andres Freund , "Si, Evan" , "pgsql-bugs@lists.postgresql.org" , Laurenz Albe References: <19369-aa853da20e970a89@postgresql.org> <20ad6102-afed-4821-9136-d0b55b5a45f9@gmail.com> Content-Language: en-US From: Pierre Forstmann In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------kRKvFWwDH3bIvvyuwd0GyhMj Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Surya, I confirm that the compiler warning is fixed in patch v4. About testing with meson I use following commands: # make check meson test -C build --print-errorlogs --suite setup --suite regress # make installcheck-world meson test -C build -q --print-errorlogs --setup running I have used Ubuntu 2004 to reproduce the issue with Linux kernel 5.4. After applying the patch and setting io_method=io_uring ,I have checked that PG cannot be restarted: 2026-08-27 14:54:13.787 UTC [98714] FATAL:  kernel does not support required io_uring operations 2026-08-27 14:54:13.787 UTC [98714] DETAIL:  The kernel supports io_uring but lacks one or more of the required opcodes (IORING_OP_READ, IORING_OP_WRITE, IORING_OP_READV, IORING_OP_WRITEV). This typically occurs on Linux kernels older than 5.6. 2026-08-27 14:54:13.787 UTC [98714] HINT:  Either upgrade your kernel to version 5.6 or newer, or use io_method=worker. 2026-08-27 14:54:13.788 UTC [98714] LOG:  database system is shut down I have checked this with building PG with make and with meson. I have also reviewed the source code and I have question about following code section: #ifdef HAVE_IO_URING_OPCODE_SUPPORTED         /*          * Use io_uring_opcode_supported() if available (liburing 2.1+).          * This directly queries the kernel for opcode support.          *          * PostgreSQL uses both single-buffer (READ/WRITE) and vectored          * (READV/WRITEV) operations. READV/WRITEV were added in kernel 5.1,          * but READ/WRITE were added in kernel 5.6. Check for all four to          * ensure complete support.          */         if (!io_uring_opcode_supported(&test_ring, IORING_OP_READ) ||                 !io_uring_opcode_supported(&test_ring, IORING_OP_WRITE) ||                 !io_uring_opcode_supported(&test_ring, IORING_OP_READV) ||                 !io_uring_opcode_supported(&test_ring, IORING_OP_WRITEV))         {                 unsupported = true;         } #else I have tried to compile the routine "is_uring_read_write_unsupported" in  a standalone executable and I get following errors: taio.c: In function ‘is_uring_read_write_unsupported’: taio.c:63:40: error: passing argument 1 of ‘io_uring_opcode_supported’ from incompatible pointer type [-Wincompatible-pointer-types]    63 |         if (!io_uring_opcode_supported(&test_ring, IORING_OP_READ) ||       |                                        ^~~~~~~~~~       |                                        |       |                                        struct io_uring * In file included from taio.c:16: /usr/include/liburing.h:153:74: note: expected ‘const struct io_uring_probe *’ but argument is of type ‘struct io_uring *’   153 | IOURINGINLINE int io_uring_opcode_supported(const struct io_uring_probe *p,       |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ taio.c:64:44: error: passing argument 1 of ‘io_uring_opcode_supported’ from incompatible pointer type [-Wincompatible-pointer-types]    64 |  !io_uring_opcode_supported(&test_ring, IORING_OP_WRITE) ||       |                                            ^~~~~~~~~~       |                                            |       |                                            struct io_uring * /usr/include/liburing.h:153:74: note: expected ‘const struct io_uring_probe *’ but argument is of type ‘struct io_uring *’   153 | IOURINGINLINE int io_uring_opcode_supported(const struct io_uring_probe *p,       |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ taio.c:65:44: error: passing argument 1 of ‘io_uring_opcode_supported’ from incompatible pointer type [-Wincompatible-pointer-types]    65 |  !io_uring_opcode_supported(&test_ring, IORING_OP_READV) ||       |                                            ^~~~~~~~~~       |                                            |       |                                            struct io_uring * /usr/include/liburing.h:153:74: note: expected ‘const struct io_uring_probe *’ but argument is of type ‘struct io_uring *’   153 | IOURINGINLINE int io_uring_opcode_supported(const struct io_uring_probe *p,       |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ taio.c:66:44: error: passing argument 1 of ‘io_uring_opcode_supported’ from incompatible pointer type [-Wincompatible-pointer-types]    66 |  !io_uring_opcode_supported(&test_ring, IORING_OP_WRITEV))       |                                            ^~~~~~~~~~       |                                            |       |                                            struct io_uring * /usr/include/liburing.h:153:74: note: expected ‘const struct io_uring_probe *’ but argument is of type ‘struct io_uring *’   153 | IOURINGINLINE int io_uring_opcode_supported(const struct io_uring_probe *p,       |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ I get these errors both with Debian 13 and Ubuntu 2004. Can you double-check if this is the right way to call io_uring_opcode_support and/or if there is an issue with make/meson configuration ? Regards, PF Le 27/08/2026 à 01:28, surya poondla a écrit : > Hi Pierre, > > Thank you for the review. > > I fixed the compiler warning in v4. > > I also would like to know if you manage to run the equivalent of > 'make installcheck-world" with meson ? > > > I couldn't either. I noticed the "meson test --setup running" was > running SQL suites (regress, isolation) only and  not the TAP suite. > So it does not look equivalent to installcheck-world in any case. > > I am doing some additional testing and will update my findings. > > Regards, > Surya Poondla --------------kRKvFWwDH3bIvvyuwd0GyhMj Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Hi Surya,

I confirm that the compiler warning is fixed in patch v4.

About testing with meson I use following commands:

# make check
meson test -C build --print-errorlogs --suite setup --suite regress
# make installcheck-world
meson test -C build -q --print-errorlogs --setup running

I have used Ubuntu 2004 to reproduce the issue with Linux kernel 5.4.

After applying the patch and setting io_method=io_uring ,I have checked that PG cannot be restarted:

2026-08-27 14:54:13.787 UTC [98714] FATAL:  kernel does not support required io_uring operations
2026-08-27 14:54:13.787 UTC [98714] DETAIL:  The kernel supports io_uring but lacks one or more of the required opcodes (IORING_OP_READ, IORING_OP_WRITE, IORING_OP_READV, IORING_OP_WRITEV). This typically occurs on Linux kernels older than 5.6.
2026-08-27 14:54:13.787 UTC [98714] HINT:  Either upgrade your kernel to version 5.6 or newer, or use io_method=worker.
2026-08-27 14:54:13.788 UTC [98714] LOG:  database system is shut down

I have checked this with building PG with make and with meson.

I have also reviewed the source code and I have question about following code section:

#ifdef HAVE_IO_URING_OPCODE_SUPPORTED
        /*
         * Use io_uring_opcode_supported() if available (liburing 2.1+).
         * This directly queries the kernel for opcode support.
         *
         * PostgreSQL uses both single-buffer (READ/WRITE) and vectored
         * (READV/WRITEV) operations. READV/WRITEV were added in kernel 5.1,
         * but READ/WRITE were added in kernel 5.6. Check for all four to
         * ensure complete support.
         */
        if (!io_uring_opcode_supported(&test_ring, IORING_OP_READ) ||
                !io_uring_opcode_supported(&test_ring, IORING_OP_WRITE) ||
                !io_uring_opcode_supported(&test_ring, IORING_OP_READV) ||
                !io_uring_opcode_supported(&test_ring, IORING_OP_WRITEV))
        {
                unsupported = true;
        }
#else


I have tried to compile the routine "is_uring_read_write_unsupported" in  a standalone executable and I get following errors:

taio.c: In function ‘is_uring_read_write_unsupported’:
taio.c:63:40: error: passing argument 1 of ‘io_uring_opcode_supported’ from incompatible pointer type [-Wincompatible-pointer-types]
   63 |         if (!io_uring_opcode_supported(&test_ring, IORING_OP_READ) ||
      |                                        ^~~~~~~~~~
      |                                        |
      |                                        struct io_uring *
In file included from taio.c:16:
/usr/include/liburing.h:153:74: note: expected ‘const struct io_uring_probe *’ but argument is of type ‘struct io_uring *’
  153 | IOURINGINLINE int io_uring_opcode_supported(const struct io_uring_probe *p,
      |                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
taio.c:64:44: error: passing argument 1 of ‘io_uring_opcode_supported’ from incompatible pointer type [-Wincompatible-pointer-types]
   64 |                 !io_uring_opcode_supported(&test_ring, IORING_OP_WRITE) ||
      |                                            ^~~~~~~~~~
      |                                            |
      |                                            struct io_uring *
/usr/include/liburing.h:153:74: note: expected ‘const struct io_uring_probe *’ but argument is of type ‘struct io_uring *’
  153 | IOURINGINLINE int io_uring_opcode_supported(const struct io_uring_probe *p,
      |                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
taio.c:65:44: error: passing argument 1 of ‘io_uring_opcode_supported’ from incompatible pointer type [-Wincompatible-pointer-types]
   65 |                 !io_uring_opcode_supported(&test_ring, IORING_OP_READV) ||
      |                                            ^~~~~~~~~~
      |                                            |
      |                                            struct io_uring *
/usr/include/liburing.h:153:74: note: expected ‘const struct io_uring_probe *’ but argument is of type ‘struct io_uring *’
  153 | IOURINGINLINE int io_uring_opcode_supported(const struct io_uring_probe *p,
      |                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
taio.c:66:44: error: passing argument 1 of ‘io_uring_opcode_supported’ from incompatible pointer type [-Wincompatible-pointer-types]
   66 |                 !io_uring_opcode_supported(&test_ring, IORING_OP_WRITEV))
      |                                            ^~~~~~~~~~
      |                                            |
      |                                            struct io_uring *
/usr/include/liburing.h:153:74: note: expected ‘const struct io_uring_probe *’ but argument is of type ‘struct io_uring *’
  153 | IOURINGINLINE int io_uring_opcode_supported(const struct io_uring_probe *p,
      |                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

I get these errors both with Debian 13 and Ubuntu 2004.

Can you double-check if this is the right way to call io_uring_opcode_support and/or if there is an issue with make/meson configuration ?

Regards,

PF



Le 27/08/2026 à 01:28, surya poondla a écrit :
Hi Pierre,

Thank you for the review.

I fixed the compiler warning in v4.

I also would like to know if you manage to run the equivalent of 'make installcheck-world" with meson ?

I couldn't either. I noticed the "meson test --setup running" was running SQL suites (regress, isolation) only and  not the TAP suite. 
So it does not look equivalent to installcheck-world in any case.

I am doing some additional testing and will update my findings.

Regards,
Surya Poondla
--------------kRKvFWwDH3bIvvyuwd0GyhMj--