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

Binary detection logic fails when pg version reports OS details #9

Open
nickgsc opened this issue Oct 30, 2020 · 3 comments
Open

Binary detection logic fails when pg version reports OS details #9

nickgsc opened this issue Oct 30, 2020 · 3 comments

Comments

@nickgsc
Copy link

nickgsc commented Oct 30, 2020

On our database instance, the details of the OS are included in the version string that is reported

postgres@linus-db:~/aiven-db-migrate$ psql --version
psql (PostgreSQL) 12.1 (Ubuntu 12.1-1.pgdg18.04+1)

This interferes with the binary detection logic in the migration code as it includes that in the paths it tries to search:

2020-10-30 15:18:14,652	PGMigrate	ERROR	Couldn't find pg version '12.1 (Ubuntu 12.1-1.pgdg18.04+1)' bin dir, tried: ['/usr/pgsql-12.1 (Ubuntu 12.1-1.pgdg18.04+1)/bin', '/usr/pgsql-12.1 (Ubuntu 12.1-1.pgdg18/bin', '/usr/lib/postgresql/12.1 (Ubuntu 12.1-1.pgdg18.04+1)/bin', '/usr/lib/postgresql/12.1 (Ubuntu 12.1-1.pgdg18/bin']
@nickgsc
Copy link
Author

nickgsc commented Oct 30, 2020

I worked around this in the meantime by hard-coding the correct path into the method in pgutils.py

@gabriel-tincu
Copy link

Good point about this.... I'll make it a future task to have a more reliable way of extracting the version

@gabriel-tincu
Copy link

@lornajane lornajane self-assigned this Feb 16, 2021
@lornajane lornajane removed their assignment Sep 5, 2022
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

3 participants