"John Liu" <johnl@emrx.com> writes:
> emrxdbs=# select * from patient;
> Illegal instruction (core dumped)
Oh, you mean psql is dumping core instead of the backend. Sounds like
it's failing to recover nicely from running out of memory for the query
result.
Can you get a stack trace for us?
regards, tom lane