Re: VM corruption on standby - Mailing list pgsql-hackers

From Tom Lane
Subject Re: VM corruption on standby
Date
Msg-id 421825.1755535947@sss.pgh.pa.us
Whole thread Raw
In response to Re: VM corruption on standby  (Kirill Reshke <reshkekirill@gmail.com>)
Responses Re: VM corruption on standby
List pgsql-hackers
Kirill Reshke <reshkekirill@gmail.com> writes:
> On Sun, 17 Aug 2025 at 19:33, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I do not like this patch one bit: it will replace one set of problems
>> with another set, namely systems that fail to shut down.

> I did not observe this during my by-hand testing. I am under the
> impression that CRIT sections are something that backend (or other)
> postgres processes try to pass quickly. So, what this patch is doing,
> is that it defers the process reaction to postmaster death until the
> end of the CRIT section.

Well, if you're inside WaitEventSetWaitBlock, you have little control
over how long you're going to sit.  There is a separate discussion
to be had over whether we should prohibit calling that function
inside a critical section.  But I'm of the opinion that proc_exit
is the wrong thing to use after seeing postmaster death, critical
section or no.  We should assume that system integrity is already
compromised, and get out as fast as we can with as few side-effects
as possible.  It'll be up to the next generation of postmaster to
try to clean up.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Filip Janus
Date:
Subject: Re: Proposal: Adding compression of temporary files
Next
From: Sami Imseih
Date:
Subject: Re: Improve LWLock tranche name visibility across backends