Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: DATABASE NAME PARSER!! #44

Open
izelnakri opened this issue Oct 31, 2014 · 5 comments
Open

BUG: DATABASE NAME PARSER!! #44

izelnakri opened this issue Oct 31, 2014 · 5 comments

Comments

@izelnakri
Copy link

When the target database has '_' in it's database name(ex. postgresql://localhost:5432/railsapp_development), stellar restore command doesn't work properly! This is a terrible bug considering the rails convention to use underscore per rails environment database. The code that parses the database names should take into account this rather "popular" edge-case. It took me few hours to find out this bug.

I guess this person had the same issue: #27

@izelnakri
Copy link
Author

After few more tries Im not sure if the problem is name parsing but restore command certainly doesn't work for me:

File "/Library/Python/2.7/site-packages/sqlalchemy/engine/default.py", line 435, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.OperationalError: (OperationalError) terminating connection due to administrator command server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. 'SHOW server_version;' {}

@izelnakri
Copy link
Author

I found the solution. If you don't have a database with the unix user (meaning if you cannot access your postgres terminal by just psql command, but you can access with typing the database name directly; psql my_database_name). Stellar simply doesn't work. Stellar follows the postgres convention: http://www.revsys.com/blog/2007/may/16/common-postgresql-problem/ . This should have been indicated in the README.MD, it could have saved me hours!

@Teemu
Copy link
Contributor

Teemu commented Nov 13, 2014

Yes this is a known problem. You can either create a database with the name of the user or you can use configuration like this:

project_name: pelsu
stellar_url: postgresql://localhost:5432/stellar_data
tracked_databases: [pelsu]
url: postgresql://localhost:5432/postgres

In this example, the url is refering to database 'postgres' which seems to be included in every installation. Please note it may not be same as one of the tracked databases.

@izelnakri
Copy link
Author

README.md explanation would be great.

Teemu added a commit that referenced this issue Nov 16, 2014
@Teemu
Copy link
Contributor

Teemu commented Nov 16, 2014

I added a warning to README.md. I'm hoping I will be able to fix this issue in software.

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

No branches or pull requests

2 participants