=== Applying patches on top of PostgreSQL commit ID 155c03ee9d449589fa93aabcac41d643d03875b9 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Fri Apr 10 07:06:26 UTC 2026 On branch cf/6617 nothing to commit, working tree clean === using 'git am' to apply patch ./v2-0001-Release-io_uring-resources-on-shmem-exit.patch === Applying: Release io_uring resources on shmem exit Using index info to reconstruct a base tree... M src/backend/storage/aio/aio_init.c M src/backend/storage/aio/method_io_uring.c M src/include/storage/aio_internal.h Falling back to patching base and 3-way merge... Auto-merging src/include/storage/aio_internal.h Auto-merging src/backend/storage/aio/method_io_uring.c CONFLICT (content): Merge conflict in src/backend/storage/aio/method_io_uring.c Auto-merging src/backend/storage/aio/aio_init.c CONFLICT (content): Merge conflict in src/backend/storage/aio/aio_init.c error: Failed to merge in the changes. hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 Release io_uring resources on shmem exit When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". === using patch(1) to apply patch ./v2-0001-Release-io_uring-resources-on-shmem-exit.patch === patching file src/backend/storage/aio/aio_init.c Hunk #1 succeeded at 234 with fuzz 2 (offset 89 lines). Hunk #2 FAILED at 226. 1 out of 2 hunks FAILED -- saving rejects to file src/backend/storage/aio/aio_init.c.rej patching file src/backend/storage/aio/method_io_uring.c Hunk #1 FAILED at 51. Hunk #2 FAILED at 71. Hunk #3 succeeded at 403 (offset 8 lines). 2 out of 3 hunks FAILED -- saving rejects to file src/backend/storage/aio/method_io_uring.c.rej patching file src/include/storage/aio_internal.h Hunk #1 succeeded at 283 with fuzz 2 (offset 1 line). Unstaged changes after reset: M src/backend/storage/aio/aio_init.c M src/backend/storage/aio/method_io_uring.c M src/include/storage/aio_internal.h Removing src/backend/storage/aio/aio_init.c.rej Removing src/backend/storage/aio/method_io_uring.c.rej === using 'git apply' to apply patch ./v2-0001-Release-io_uring-resources-on-shmem-exit.patch === Applied patch to 'src/backend/storage/aio/aio_init.c' with conflicts. Applied patch to 'src/backend/storage/aio/method_io_uring.c' with conflicts. Applied patch to 'src/include/storage/aio_internal.h' cleanly. U src/backend/storage/aio/aio_init.c U src/backend/storage/aio/method_io_uring.c diff --cc src/backend/storage/aio/aio_init.c index da30d792a88,abd09faaa2c..00000000000 --- a/src/backend/storage/aio/aio_init.c +++ b/src/backend/storage/aio/aio_init.c @@@ -173,11 -146,23 +173,29 @@@ AioShmemRequest(void *arg } /* ++<<<<<<< ours + * Initialize AIO shared memory during postmaster startup. + */ +static void +AioShmemInit(void *arg) ++======= + * Wrapper around pgaio_method_ops->shmem_cleanup to satisfy the + * on_shmem_exit() callback signature. + */ + static void + pgaio_shmem_cleanup(int code, Datum arg) + { + /* + * No null check needed here; AioShmemInit only registers this callback + * when shmem_cleanup is non-null. + */ + pgaio_method_ops->shmem_cleanup(); + } + + void + AioShmemInit(void) ++>>>>>>> theirs { - bool found; uint32 io_handle_off = 0; uint32 iovec_off = 0; uint32 per_backend_iovecs = io_max_concurrency * io_max_combine_limit; @@@ -223,15 -222,14 +241,26 @@@ } } ++<<<<<<< ours + if (pgaio_method_ops->shmem_callbacks.init_fn) + pgaio_method_ops->shmem_callbacks.init_fn(pgaio_method_ops->shmem_callbacks.opaque_arg); +} + +static void +AioShmemAttach(void *arg) +{ + if (pgaio_method_ops->shmem_callbacks.attach_fn) + pgaio_method_ops->shmem_callbacks.attach_fn(pgaio_method_ops->shmem_callbacks.opaque_arg); ++======= + out: + /* Initialize IO method specific resources. */ + if (pgaio_method_ops->shmem_init) + pgaio_method_ops->shmem_init(!found); + + /* Register callback to release any resources allocated above. */ + if (pgaio_method_ops->shmem_cleanup) + on_shmem_exit(pgaio_shmem_cleanup, 0); ++>>>>>>> theirs } void diff --cc src/backend/storage/aio/method_io_uring.c index c0f9fc9c303,4dfe3cb02eb..00000000000 --- a/src/backend/storage/aio/method_io_uring.c +++ b/src/backend/storage/aio/method_io_uring.c @@@ -49,8 -49,9 +49,14 @@@ /* Entry points for IoMethodOps. */ ++<<<<<<< ours +static void pgaio_uring_shmem_request(void *arg); +static void pgaio_uring_shmem_init(void *arg); ++======= + static size_t pgaio_uring_shmem_size(void); + static void pgaio_uring_shmem_init(bool first_time); + static void pgaio_uring_shmem_cleanup(void); ++>>>>>>> theirs static void pgaio_uring_init_backend(void); static int pgaio_uring_submit(uint16 num_staged_ios, PgAioHandle **staged_ios); static void pgaio_uring_wait_one(PgAioHandle *ioh, uint64 ref_generation); @@@ -70,8 -70,9 +76,14 @@@ const IoMethodOps pgaio_uring_ops = */ .wait_on_fd_before_close = true, ++<<<<<<< ours + .shmem_callbacks.request_fn = pgaio_uring_shmem_request, + .shmem_callbacks.init_fn = pgaio_uring_shmem_init, ++======= + .shmem_size = pgaio_uring_shmem_size, + .shmem_init = pgaio_uring_shmem_init, + .shmem_cleanup = pgaio_uring_shmem_cleanup, ++>>>>>>> theirs .init_backend = pgaio_uring_init_backend, .submit = pgaio_uring_submit,