PG Bug reporting form <noreply@postgresql.org> writes:
> Using ubuntu packages 9.6.15 from postgresql.org. Recently a unchanged
> routine crashes a postgres backend process most of the time (or always?)
> with a segmentation fault.
> Call stack below. Please let me know what further details can help you. The
> core is 3.6G, I can provide it on request.
A self-contained test case would be much handier. The stack trace
provides a suggestive hint about what you're doing:
> #15 0x0000564007ab5455 in exec_simple_query (query_string=0x5640089ed678
> "DROP TABLE if EXISTS loose;CREATE UNLOGGED TABLE loose (id bigint, node
> bigint, lat float, lon float, x integer, y integer);INSERT INTO loose SELECT
> id, nodes[1] AS node FROM planet_osm_ways WHERE ARR"...)
> at ./build/../src/backend/tcop/postgres.c:1109
but that's not enough to reproduce the problem.
Note that in psql, the way to submit a multi-query string like that
is to backslash-escape all but the last semicolon:
DROP TABLE if EXISTS loose\;CREATE UNLOGGED ... y integer)\;INSERT INTO ...
That might be necessary to reproduce the problem, or not.
regards, tom lane