Hello,
I'm seeing "Segmentation fault" with a following pg_restore command, with the certain dump file (attached to this email, I had to remove some data from the file as the dump file contains the data that cannot be shared publicly, but I can reproduce this with full dump file also):
$ pg_restore -l nocnoc_segfault.dump
Segmentation fault: 11
Here is my environment, but I was able to reproduce this in the other place as well (e.g. Ubuntu 14.04):
Process: pg_restore [64478]
Path: /usr/local/Cellar/postgresql/9.5.2/bin/pg_restore
Identifier: pg_restore
Version: 0
Code Type: X86-64 (Native)
Parent Process: bash [55643]
Responsible: Terminal [1371]
OS Version: Mac OS X 10.11.6 (15G1004)
Here is the environment that the dump file was created:
The creator has the dump file in a container with no volumes, so he extracted the dump using a following command:
docker exec -t nocnoc_db_1 cat /backup/nocnoc_api_development.dump > nocnoc_api_development.dump
The backup was taking with a following command:
pg_dump -Fc --no-acl --no-owner nocnoc_api_development
The dump file's format is dos when you open with vim, and if you change this to unix (:set ff=unix) and save it, the segmentation fault will go away and it gives you an expected error (it raises an error since I removed some data from the dump file, the file is not in the perfect shape. If I tried to restore the full dump file with the unix file format, it works fine):
$ pg_restore -l nocnoc_unix.dump
pg_restore: [custom archiver] could not read from input file: end of file
Please let me know if there is any other information that I could provide.
Thanks!
Keiko Oda