Re: add assertion for palloc in signal handlers - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: add assertion for palloc in signal handlers
Date
Msg-id aZXe47ZFcrOOKXh3@nathan
Whole thread Raw
In response to Re: add assertion for palloc in signal handlers  (Kirill Reshke <reshkekirill@gmail.com>)
Responses Re: add assertion for palloc in signal handlers
Re: add assertion for palloc in signal handlers
List pgsql-hackers
On Wed, Feb 18, 2026 at 12:13:46PM +0500, Kirill Reshke wrote:
> Hi! I tested patch under --single (single user mode), and ISTM that we
> can reach palloc from ProcessInterrups here?
> Maybe we should not elog in single user mode inside sighandler...

This is reproducible even without single-user mode by sending SIGQUIT to a
client backend.  Both die() and quickdie() call ereport(), and both are
commonly used as signal handlers for SIGTERM and SIGQUIT.

-- 
nathan



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: index prefetching
Next
From: Ashutosh Bapat
Date:
Subject: Re: Better shared data structure management and resizable shared data structures