Jeremy Wilson <jwilson@xxxxxxxxx> writes: > I did a completely fresh initdb to get clean logs: > ... > free(): invalid pointer > 2020-11-13 11:30:05.292 EST [205647] LOG: server process (PID 205659) was terminated by signal 6: Aborted This is highly significant. It suggests that you're getting bit by the postgis crash-in-atexit problem that a couple of people have reported (and which, unfortunately, we don't yet know the exact cause of). I now suspect that something similar is happening earlier in the process and preventing template1 from getting created, or maybe it's created but then we can't access it. Are you by any chance trying to preload any of the postgis-related extensions? If so, try not doing that. regards, tom lane