Skip to content

Fix/Add CHECK_FOR_INTERRUPTS to health check worker to prevent DROP …#1108

Open
akankshahu wants to merge 1 commit intohapostgres:mainfrom
akankshahu:fix/health-check-worker-interrupts
Open

Fix/Add CHECK_FOR_INTERRUPTS to health check worker to prevent DROP …#1108
akankshahu wants to merge 1 commit intohapostgres:mainfrom
akankshahu:fix/health-check-worker-interrupts

Conversation

@akankshahu
Copy link

…DATABASE hangs (#1063)

Copilot AI review requested due to automatic review settings January 21, 2026 10:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes issue #1063 where DROP DATABASE operations would hang when health check workers were running. The fix adds proper interrupt handling to allow health check workers to respond promptly to termination signals.

Changes:

  • Added CHECK_FOR_INTERRUPTS() calls in health check worker loops to enable proper signal handling
  • Added explicit got_sigterm checks after connection establishment and latch wakeup for faster shutdown
  • Added comprehensive test suite to verify DROP DATABASE operations complete without hanging

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/monitor/health_check_worker.c Added interrupt checking in HealthCheckWorkerMain and DoHealthChecks loops, plus explicit SIGTERM checks after connection and latch wait for fast exit
tests/test_drop_database.py New comprehensive test suite covering basic DROP, DROP WITH FORCE, multiple sequential drops, and worker cleanup verification

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant