James Creasy <james@buildtrue.io> writes:
> Now the interesting part, we're getting a seg fault which goes away when we
> run VACUUM on the table before writing to it, which is perplexing as the
> table can be newly created and contains a few hundred rows. How could the
> db get into a fatal state so quickly?
If you didn't find it already, there's some advice here:
https://wiki.postgresql.org/wiki/Generating_a_stack_trace_of_a_PostgreSQL_backend
With so many moving parts, it's hard to guess whether the bug is in
Postgres or PostGIS or what, but a stack trace should be informative.
Also, as that page mentions, it's a good idea to make sure you
are on latest release(s) before you spend time digging.
regards, tom lane