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

Error initializing storage of type postgresql for PostgreSQL 10.2 #3949

Closed
vitya-ne opened this issue Feb 9, 2018 · 2 comments
Closed

Error initializing storage of type postgresql for PostgreSQL 10.2 #3949

vitya-ne opened this issue Feb 9, 2018 · 2 comments

Comments

@vitya-ne
Copy link
Contributor

vitya-ne commented Feb 9, 2018

Vault initialization have an error after upgrade Postgresql to 10.2

This place in postgresql.go now wrong:

var upsert_required bool
upsert_required_query := "SELECT string_to_array(setting, '.')::int[] < '{9,5}' FROM pg_settings WHERE name = 'server_version'"

on PostgreSQL 10.1:

SELECT string_to_array(setting, '.') FROM pg_settings WHERE name = 'server_version';
 string_to_array 
-----------------
 {10,1}

on PostgreSQL 10.2:

SELECT string_to_array(setting, '.') FROM pg_settings WHERE name = 'server_version';
          string_to_array          
-----------------------------------
 {10,"2 (Debian 10",2-1,pgdg90+1)}

  • Vault Version: 0.9.3
  • Operating System/Architecture: Debian 9.3

Startup Log Output:
Error initializing storage of type postgresql: failed to check for native upsert: pq: неверное значение для целого числа: "2 (Debian 10"

@vishalnayak vishalnayak added this to the 0.9.4 milestone Feb 9, 2018
@jefferai
Copy link
Member

It's unclear whether this is something Debian-specific or not; regardless this is a community supported backend so definitely the fastest way to get this resolved would be to put in a PR.

@jefferai jefferai modified the milestones: 0.9.4, not-scheduled Feb 14, 2018
vitya-ne added a commit to vitya-ne/vault that referenced this issue Feb 15, 2018
use server_version_num instead of parsing the text version. See: https://www.postgresql.org/docs/10/static/functions-info.html
@vitya-ne
Copy link
Contributor Author

@jefferai, thanks!
issue resolved in version 0.9.4.

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

4 participants