Running some porting scripts (command line PHP) for drupal yesterday - and for the first time trying out postgres.
I kept getting a segmentation fault at the end of each script.
Turns out that there is some issue with the curl and postgres php modules.
For a workaround on debian see debian bug 411982 - it changes the order of loading.