Yiqing Jin <yiqing.jin@gmail.com> writes:
> I'm trapped with a problem when trying to create an index on a table with
> about 2.8 billion records in it.
> ALTER TABLE ONLY nodes ADD CONSTRAINT pk_nodes PRIMARY KEY (id);
> or
> create index pknode on nodes(id);
> Postgres terminated with segfault during the proocess.
That shouldn't happen. Can you get a stack trace from the core dump?
https://wiki.postgresql.org/wiki/Generating_a_stack_trace_of_a_PostgreSQL_backend
regards, tom lane