Skip to content

refactor: remove unnecessary signal handler - #313

Open
imor wants to merge 1 commit into
rs/unblock-signals-after-installing-signal-handlersfrom
rs/remove-unnecessary-signal-handler
Open

imor wants to merge 1 commit into
rs/unblock-signals-after-installing-signal-handlersfrom
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
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 9b5c0fa to e14c28c Compare October 8, 2026 08:27

This branch has not been deployed

No deployments
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.

2 participants