pgsql: Fix copy-pasto with process count calculation in method_io_uring

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix copy-pasto with process count calculation in method_io_uring
Date: 2025-06-05 00:51:10
Message-ID: E1uMyp4-000DvN-0x@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix copy-pasto with process count calculation in method_io_uring.c

This commit replaces the formula used for "TotalProcs" with a call to
pgaio_uring_procs() in pgaio_uring_shmem_init() for the shared memory
initialization, which is exactly the same, removing a duplication.

pgaio_uring_procs() is used for shared memory sizing and a sanity check,
and it has some documentation explaining some reasoning behind the
formula.

Author: Japin Li <japinli(at)hotmail(dot)com>
Discussion: https://postgr.es/m/ME0P300MB044521067A1EDDA9EDEC3793B66DA@ME0P300MB0445.AUSP300.PROD.OUTLOOK.COM

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b87163e5f3847730ee5f59718d215c6e63e13bff

Modified Files
--------------
src/backend/storage/aio/method_io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Magnus Hagander 2025-06-05 08:04:07 pgsql: psql: fix order of join clauses when listing extensions
Previous Message Robert Haas 2025-06-04 18:39:17 Re: pgsql: postgres_fdw: Inherit the local transaction's access/deferrable