Using a Unix socket for postgresql (for performance) as stated here: http://drupal.org/node/26836#comment-2417054
... causes this error (due to url escape):
The drush command 'cc all' could not be executed. [error]
Drush was not able to start (bootstrap) the Drupal database. [error]
Hint: This error often occurs when Drush is trying to bootstrap a site that has not been installed or does not have a configured database.
Drush was attempting to connect to :
Drupal version : 6.20
Site URI : http://default
Database driver : pgsql
Database hostname : %2fvar%2frun%2fpostgresql%2f
Can a simple conversion patch be made for this problem? Thank you much.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | bootstrap.inc_.patch | 555 bytes | nathanweeks |
| #3 | environment.inc_.patch | 1.01 KB | nathanweeks |
Comments
Comment #1
greg.1.anderson commentedI use postgres with a standard dburl syntax, and it works fine. I'll try the performance-optimized socket syntax you suggest above and fix the URL escaping so that it works.
I presume that you have Drupal working just fine with your configuration settings.
Comment #2
threading_signals commentedGreg, yes, it's working fine with the Debian install, and I'm glad that you're going to try it. I've verified that postgresql is only accepting unix socket connections via netstat -tap and from configuring pg_hba.conf -- devel query times seems to be lower, and I like the difference. Thanks again for the look into this. Next for me is figuring out how to get memcached connected to Unix sockets. =) Drush has gotten me out of a jam from wsod, where it was unconfigurable via the browser, so it's a great tool in terms of a backup as well, I appreciate it. Paul
Comment #3
nathanweeks commentedAttached are a couple patches that add support for Unix domain sockets to drush 5.7 on Drupal 6.
The value of our $db_url in settings.php looks like this:
The patches allow the user name to be omitted from db_url, so peer authentication may be used.
The output of
drush statuslooks like this:Note that I didn't bother to fix
drush sql-connect, which outputs a slightly-invalid connection string (empty username):Comment #4
greg.1.anderson commentedThis issue was marked
closed (won't fix)because Drush has moved to Github.If desired, you may copy this bug to our Github project and then post a link here to the new issue. Please also change the status of this issue to
closed (duplicate).Please ask support questions on Drupal Answers.