Skip to content

refactor: remove unnecessary signal handler - #313

Merged
imor merged 1 commit into
masterfrom
rs/remove-unnecessary-signal-handler
Oct 13, 2026
Merged

imor merged 1 commit into
masterfrom
rs/remove-unnecessary-signal-handler

Conversation

@imor

@imor imor commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Installing a sigusr1 signal handler in pg_net background worker was redundant because the default signal handler already calls SetLatch on MyLatch, which is the same as MyProc->procLatch, which we assign to worker_state->shared_latch. In the original commit when this code was introduced shared_latch was not the same as MyLatch necessitating a custom handler, now that is no longer the case hence we can remove this redundant code.

@imor
imor added this pull request to stack #309 October 6, 2026 13:21
@imor
imor requested a review from a team as a code owner October 6, 2026 13:21
@imor
imor force-pushed the rs/remove-unnecessary-signal-handler branch from 9b5c0fa to e14c28c Compare October 8, 2026 08:27
@imor
imor force-pushed the rs/remove-unnecessary-signal-handler branch from e14c28c to c40e6a6 Compare October 11, 2026 09:46
@imor
imor force-pushed the rs/remove-unnecessary-signal-handler branch from c40e6a6 to d3d6bdf Compare October 11, 2026 12:48
@imor
imor force-pushed the rs/remove-unnecessary-signal-handler branch 4 times, most recently from 2824b10 to e6fd384 Compare October 13, 2026 06:48
Base automatically changed from rs/unblock-signals-after-installing-signal-handlers to master October 13, 2026 08:06
Installing a sigusr1 signal handler in pg_net background woker was redundant
because the default signal handler already calls SetLatch on MyLatch, which is
the same as MyProc->procLatch which we assign to worker_state->shared_latch. In
the original commit when this code was introduced the shared_latch was not the
same as MyLatch necessitating a custom handler, now that is no longer the case
hence we can remove this redundant code.
@imor
imor force-pushed the rs/remove-unnecessary-signal-handler branch from e6fd384 to ada91a3 Compare October 13, 2026 08:07
@imor
imor merged commit 897cf5b into master Oct 13, 2026
16 of 17 checks passed
@imor
imor deleted the rs/remove-unnecessary-signal-handler branch October 13, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants