Fix RequestNamedLWLockTranche in single-user mode

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: 2407c8db159dbae5afd23080a92122e1acb2f5c1
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2026-03-27T23:02:11Z
Fix RequestNamedLWLockTranche in single-user mode

PostmasterContext is not available in single-user mode, use
TopMemoryContext instead. Also make sure that we use the correct
memory context in the lappend().

Author: Nathan Bossart <nathandbossart@gmail.com>
Discussion: https://www.postgresql.org/message-id/acb_Eo1XtmCO_9z7@nathan

Files

PathChange+/−
src/backend/storage/lmgr/lwlock.c modified +9 −1

Discussion