Re: hang during shutdown - Mailing list pgsql-hackers

From Anthonin Bonnefoy
Subject Re: hang during shutdown
Date
Msg-id CAO6_Xqpzj_V1gF0ikPCVkA3Q2K5YqRnAdHiV5TqpLNAZsdwWbQ@mail.gmail.com
Whole thread
In response to Re: hang during shutdown  (Srinath Reddy Sadipiralla <srinath2133@gmail.com>)
Responses Re: hang during shutdown
List pgsql-hackers
Hi,

On Sun, Jul 5, 2026 at 11:55 PM Jeremy Schneider
<schneider@ardentperf.com> wrote:
> so far, it all started with this postgres hang during a shutdown. we didnt capture enough diagnostics to root-cause
thedomino before the hang, but the data i do have about this postgres hang is very peculiar. i'm working on some
automationto gather more diagnostics if there is a recurrence. in the meantime i wanted to share what i do know, in
caseanyone else has seen something similar. 
>
> postgres version 16.13
> Ubuntu 22.04.5 LTS
> kernel 5.15.0-1110-azure
>
> between log messages and wal contents, it appears PostmasterStateMachine transitioned into PM_WAIT_BACKENDS but never
progressedbeyond this for a full 30 minutes until external automation finally killed the processes. 

Did you have an active logical replication stream at the time of the
shutdown? If so, it's very likely due to a bug in the logical
walsender that can be stuck in an infinite loop when the WAL is in a
specific state (last record is a rollback crossing the WAL page
boundary).

A fix for that was released in the latest 16.14 minor release[0].

[0]: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=82935467a

Regards,
Anthonin Bonnefoy



pgsql-hackers by date:

Previous
From: Rui Zhao
Date:
Subject: Re: Improving display of octal GUCs
Next
From: Peter Eisentraut
Date:
Subject: Re: [PATCH] Fix null pointer dereference in PG19