It appears that the consensus is that this is a bug in the postgres module but exposed by the curl module. I won't pretend to have a clue what I'm talking about, but I will note that, for instance, renaming '/ etc/php5/conf.d/curl.ini' to '/etc/php5/conf.d/postpgsql-curl.ini' seems to solve the problem.