| From: | Pierre <pierre(dot)forstmann(at)gmail(dot)com> |
|---|---|
| To: | Steven Niu <niushiji(at)gmail(dot)com>, Andreas Karlsson <andreas(at)proxel(dot)se>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PATCH] check kernel version for io_method |
| Date: | 2026-01-14 10:18:00 |
| Message-ID: | bb976e6b-bbfb-464a-b287-07da075a364f@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Le 14/01/2026 à 08:31, Steven Niu a écrit :
> From: Andreas Karlsson <andreas(at)proxel(dot)se>
> Sent: Wednesday, January 14, 2026 15:27
> To: Steven Niu <niushiji(at)gmail(dot)com>; Pierre <pierre(dot)forstmann(at)gmail(dot)com>; pgsql-hackers(at)lists(dot)postgresql(dot)org <pgsql-hackers(at)lists(dot)postgresql(dot)org>
> Subject: Re: [PATCH] check kernel version for io_method
>
>
> On 1/14/26 8:22 AM, Steven Niu wrote:
>> I agree that you are correct for now. But in future, the IoMethod may have new member. Then we have to process it.
>>
>> How about change to like this:
>> + #else
>> + if (*newval == IOMETHOD_IO_URING)
>> + {
>> + GUC_check_errdetail("io_uring not enabled.");
>> + return false;
>> + }
> No, that would be incorrect. It would not even compile.
> IOMETHOD_IO_URING is not even defined if we do not compile with liburing
> enabled. You can try it out yourself by compiling PostgreSQL without
> io_uring support and then try to enable it. You will get an error and
> that code will never be reached.
>
> Andreas
>
>
>
>
> ________________________________________
>
>
> Yes, you are definitely correct.
> I'd like to withdwar my proposal.
Hello,
I have modified message in case io_uring is not enabled when building
PG. But currently I cannot test it, GUC parameter is rejected in earlier
steps:
pg_ctl start
waiting for server to start....2026-01-14 09:35:37.046 GMT [16336] LOG:
invalid value for parameter "io_method": "io_uring"
2026-01-14 09:35:37.046 GMT [16336] HINT: Available values: sync, worker.
2026-01-14 10:35:37.047 CET [16336] FATAL: configuration file
"/home/pierre/pgdata/postgresql.conf" contains errors
stopped waiting
pg_ctl: could not start server
I don't know how to test io_uring features in code because if io_uring
is not enabled at compilation time, I don't think it is possible to
compile code calling io_uring_get_probe_ring() or
io_uring_opcode_supported() ?
Thanks.
| Attachment | Content-Type | Size |
|---|---|---|
| 0002-patch-check-kernel-version-for-io_method.patch | text/x-patch | 2.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ilia Evdokimov | 2026-01-14 10:19:36 | Re: Hash-based MCV matching for large IN-lists |
| Previous Message | Soumya S Murali | 2026-01-14 10:11:36 | Re: [PATCH] Expose checkpoint reason to completion log messages. |