| From: | zengman <zengman(at)halodbtech(dot)com> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Cc: | andres <andres(at)anarazel(dot)de> |
| Subject: | [PATCH] aio: Refactor to deduplicate shared and local completion callbacks |
| Date: | 2026-01-02 12:51:14 |
| Message-ID: | tencent_1910067D4CAEBF0B56359140@qq.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
I've observed that the functions `pgaio_io_call_complete_shared()` and` pgaio_io_call_complete_local()` contain nearly identical code,
with only minor differences in initialization and callback selection.
This code duplication was previously noted with an XXX comment.
I propose extracting the common logic into a new internal function `pgaio_io_call_complete_internal()`,
which uses a boolean parameter to distinguish between the two code paths.
What do you think of this approach?
--
Regards,
Man Zeng
www.openhalo.org
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-aio-Deduplicate-shared-and-local-completion-callback.patch | application/octet-stream | 5.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Henson Choi | 2026-01-02 13:23:39 | Re: SQL Property Graph Queries (SQL/PGQ) |
| Previous Message | Amul Sul | 2026-01-02 12:29:54 | Re: pg_waldump: support decoding of WAL inside tarfile |