Re: add assertion for palloc in signal handlers

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Andres Freund <andres(at)anarazel(dot)de>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: add assertion for palloc in signal handlers
Date: 2026-02-18 15:46:43
Message-ID: aZXe47ZFcrOOKXh3@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2026-02-18 15:47:07 Re: Better shared data structure management and resizable shared data structures
Previous Message Tomas Vondra 2026-02-18 15:39:30 Re: index prefetching