Repository navigation
System info and instances fail with 500 when pg_stat_activity hides backend_start (Temporal.Instant.from on null) #8212
Summary
Cause
This happens even for Wiki.js's own connections when the login role differs from the role Wiki.js acts as. A common least-privilege setup does exactly that: a login with Reproduce
With SELECT usename, client_addr, application_name, backend_start, state_change FROM pg_stat_activity WHERE datname = $1 AND application_name LIKE 'Wiki.js%'Suggested fixSkip, or count without timestamps, rows where inst.backend_start = inst.backend_start ? Temporal.Instant.from(inst.backend_start).toString({ smallestUnit: 'millisecond' }) : null
inst.state_change = inst.state_change ? Temporal.Instant.from(inst.state_change).toString({ smallestUnit: 'millisecond' }) : nullAlternatively, compare Environment
|
Fixed via fe75227. Will land in next release.