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

cannot update monitored database from WebUI #244

Closed
pashagolub opened this issue Aug 1, 2023 · 0 comments
Closed

cannot update monitored database from WebUI #244

pashagolub opened this issue Aug 1, 2023 · 0 comments
Assignees
Labels
bug Something isn't working webui Admin UI related issues

Comments

@pashagolub
Copy link
Collaborator

pashagolub commented Aug 1, 2023

When trying to update connection info error occurs:

ERROR: column "md_is_helpers" of relation "monitored_db" does not exist (SQLSTATE 42703) 

The logged query is:

[ERROR] [sql:UPDATE pgwatch3.monitored_db SET "md_user" = $2,"md_password" = $3,
"md_is_superuser" = $4,"md_last_modified_on" = $5,"md_port" = $6,"md_config" = $7,
"md_root_ca_path" = $8,"md_include_pattern" = $9,"md_is_helpers" = $10,"md_id" = $11,"md_exclude_pattern" = $12,
"md_dbtype" = $13,"md_custom_tags" = $14,"md_host_config" = $15,"md_preset_config_name" = $16,
"connection_timeout_seconds" = $17,"md_preset_config_name_standby" = $18,"md_dbname" = $19,
"md_sslmode" = $20,"md_hostname" = $21,"md_config_standby" = $22,
"md_statement_timeout_seconds" = $23,"md_client_key_path" = $24,"md_group" = $25,"md_is_enabled" = $26,
"md_unique_name" = $27,
"md_password_type" = $28,"md_only_if_master" = $29,
"md_client_cert_path" = $30 WHERE md_unique_name = $1] 
[args:[test pgwatch3 pgwatch3admin false 2023-08-01T14:35:52.016796+00:00 5432 <nil>  <nil> false 1 <nil> postgres <nil> <nil> exhaustive  <nil> pgwatch3 disable postgres <nil> 5  default true test plain-text false ]] 
[err:ERROR: column "md_is_helpers" of relation "monitored_db" does not exist (SQLSTATE 42703)] [pid:780] [time:1.091687ms]

Table definition:

pgwatch3=# \d pgwatch3.monitored_db
                                                     Table "pgwatch3.monitored_db"
            Column             |           Type           | Collation | Nullable |                       Default

-------------------------------+--------------------------+-----------+----------+------------------------------------------------------
 md_id                         | integer                  |           | not null | nextval('pgwatch3.monitored_db_md_id_seq'::regclass)
 md_unique_name                | text                     |           | not null |
 md_hostname                   | text                     |           | not null |
 md_port                       | text                     |           | not null | 5432
 md_dbname                     | text                     |           | not null |
 md_user                       | text                     |           | not null |
 md_password                   | text                     |           |          |
 md_is_superuser               | boolean                  |           | not null | false
 md_sslmode                    | text                     |           | not null | 'disable'::text
 md_preset_config_name         | text                     |           |          | 'basic'::text
 md_config                     | jsonb                    |           |          |
 md_is_enabled                 | boolean                  |           | not null | true
 md_last_modified_on           | timestamp with time zone |           | not null | now()
 md_statement_timeout_seconds  | integer                  |           | not null | 5
 md_dbtype                     | text                     |           | not null | 'postgres'::text
 md_include_pattern            | text                     |           |          |
 md_exclude_pattern            | text                     |           |          |
 md_custom_tags                | jsonb                    |           |          |
 md_group                      | text                     |           | not null | 'default'::text
 md_root_ca_path               | text                     |           | not null | ''::text
 md_client_cert_path           | text                     |           | not null | ''::text
 md_client_key_path            | text                     |           | not null | ''::text
 md_password_type              | text                     |           | not null | 'plain-text'::text
 md_host_config                | jsonb                    |           |          |
 md_only_if_master             | boolean                  |           | not null | false
 md_preset_config_name_standby | text                     |           |          |
 md_config_standby             | jsonb                    |           |          |
@pashagolub pashagolub added webui Admin UI related issues bug Something isn't working labels Aug 1, 2023
@pashagolub pashagolub added this to the Built-in WebUI milestone Aug 1, 2023
@denys-holub denys-holub assigned pashagolub and unassigned denys-holub Aug 9, 2023
pashagolub added a commit that referenced this issue Aug 9, 2023
pashagolub added a commit that referenced this issue Aug 9, 2023
[-] fix update of monitored database with REST API, fixes #244
pashagolub added a commit that referenced this issue Aug 9, 2023
[-] fix update of monitored database with REST API, fixes #244
pashagolub pushed a commit that referenced this issue Aug 14, 2023
* implement `/test-connect` endpoint
* use plain connection string from frontend
* [-] fix update of monitored database with REST API, fixes #244
* [-] fix nil pointer access
* move `apiHandler` definition
* move `handleStats()`
* move `handleTestConnect()`
* rearrange webserver package files
* [-] fix `md_is_helpers` field name to `md_is_superuser`
* noWrap option added
* test DB connection request created
* test db connection type created
* test db connection request implemented
* layout changed, handle test db connection request added
* animation while test db connection request loading added
--------
Co-authored-by: Pavlo Golub <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working webui Admin UI related issues
Projects
None yet
Development

No branches or pull requests

2 participants