Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

heroku pg:pull ignoring PGPORT when calling createdb #2048

Open
Alain1405 opened this issue Dec 13, 2016 · 2 comments
Open

heroku pg:pull ignoring PGPORT when calling createdb #2048

Alain1405 opened this issue Dec 13, 2016 · 2 comments

Comments

@Alain1405
Copy link

Alain1405 commented Dec 13, 2016

I have run this command a thousand times and it worked until some days ago.
I run a local potsgres server on port 5444.

(venv-development) Alain-MBP:backend alain$ echo $PGPORT
5444
(venv-development) Alain-MBP:backend alain$ heroku pg:pull DATABASE_URL local-development/db/ --app app-name
heroku pg:pull DATABASE_URL local-development/db/ --app app-name
heroku-cli: Pulling postgresql-transparent-31571 ---> local-development/db/
createdb: could not connect to database template1: could not connect to server: Connection refused
	Is the server running on host "localhost" (::1) and accepting
	TCP/IP connections on port 5432?
could not connect to server: Connection refused
	Is the server running on host "localhost" (127.0.0.1) and accepting
	TCP/IP connections on port 5432?
make: *** [db-sync-production] Error 1

When creating the db, port 5432 is used instead.

(venv-development) Alain-MBP:backend alain$ heroku --version
heroku-toolbelt/3.43.16 (x86_64-darwin10.8.0) ruby/1.9.3
heroku-cli/5.5.8-df05424 (darwin-amd64) go1.7.4
=== Installed Plugins
[email protected]
heroku-redis-cli
heroku-repo
[email protected]

@ransombriggs
Copy link
Contributor

ransombriggs commented Dec 13, 2016

@Alain1405 I just shipped a new version (5.5.10) you can get by running heroku update. Please let me know if that fixes this bug.

@Alain1405
Copy link
Author

Alain1405 commented Dec 13, 2016

Thanks @ransombriggs , that definitely fixed it partially. Now the PGPORT env variable is honored.
However I now get, at the end of the procedure:

psql: server does not support SSL, but SSL was required
 ▸    WARNING: Extensions in newly created target database differ from existing source database.
 ▸    Target extensions:
 ▸    
 ▸    Source extensions:
 ▸    extname
 ▸    ---------
 ▸    plpgsql
 ▸    (1 row)
 ▸    
 ▸    
 ▸    HINT: You should review output to ensure that any errors
 ▸    ignored are acceptable - entire tables may have been missed, where a dependency
 ▸    could not be resolved. You may need to to install a postgresql-contrib package
 ▸    and retry.
heroku-cli: Pulling complete.

I don't understand if the SSL message and the extension message are related. For sure after all pg_dums and pg_restores the local db is not in place. I'm figuring out how to debug it.

Btw, I'm on OSX 10.12

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants