[OPEN-ILS-DEV] Any ideas why I sometimes get a "segmentation fault" with pg_restore?

Yamil Suarez ysuarez at berklee.edu
Wed Jun 12 14:04:52 EDT 2013


On Mon, Jun 10, 2013 at 6:19 PM, Yamil Suarez <ysuarez at berklee.edu> wrote:
> Hello,
>
> To maintaining test VMs with production data I usually use a combination of pg_dump[1] on the production server. I then I use "dropdb evergreen" and then pg_restore[2] on the test VMs. On occasion I get an error message of "segmentation fault" when I try to run pg_restore[2] on the test VM, but usually I don't have any issues. Before I got this error today, I did a pg_dump of the concerto data that was already on the VMs postgres, and as a test I successfully used pg_restore to reload the concerto data with out any problems. Except for some warning I usually get when I successfully run pg_restore[3]. Finally, I checked /var/log/postgresql/postgresql-9.1-main.log and only saw entries for the warnings I just mentioned from when I restored up the concerto data as a test.
>
> I was wondering if someone had an idea of why this is happening to me this morning?
>
> Thanks in advance,
> Yamil
>
>
> [1] pg_dump -Fc evergreen > prod_data.sql
>
>
> [2] pg_restore -U postgres  -C -j 4 --dbname=template1 prod_data.sql
>
>
> [3]
> WARNING:  => is deprecated as an operator name
> This name may be disallowed altogether in future versions of PostgreSQL.


For the list record, I figured out that I was getting the error
because when I used a certain GUI FTP tool and then saved the file on
an OS X machine, the pg_dump file was being changed in some way. I
confirmed this by checking the MD5 of the file. When I copied the file
in a different way, pg_restore did not give me an error anymore.

Yamil


More information about the Open-ils-dev mailing list