PostgreSQL 18 update for self-hosters

I got this error because of how nproc is calculated (I’m running on a single vCPU): -j/–jobs must be in range 1..2147483647 (it’s trying -j0 because $(($(nproc) - 1)) = 1 - 1 = 0)

The update script should probably be updated to something like -j$(( $(nproc) > 1 ? $(nproc) - 1 : 1 ))

2 Likes