Can't add PostgreSQL instances to PMM without `postgres` DB in PostgreSQL server
Description
How to test
How to document
Attachments
is cloned by
Smart Checklist
Activity

Jira Bot December 2, 2021 at 11:56 AM
To:
CC:
Hi, I'm jira-bot, Percona's Jira automation tool. I've detected that someone from
Percona has made an edit to the Summary field of an issue that you reported.
I'm not sentient (yet) so I'm not sure whether the person fixed a typo, changed
a few words, or completely rewrote the text. In any case, it is Percona Engineering's
intention to make the Summary and Description of an issue as accurate as possible
so that we're fixing the actual problem you're encountering, and to avoid
misunderstandings about symptoms and causes.
If the current Summary does not accurately reflect the problem you are reporting,
or if you feel the change was otherwise inappropriate in some way, please add a
new comment explaining things and we'll address it as soon as we can.
This message will be added only once per issue, regardless of how many times
the Summary is edited.
message-code:summary-edited

Roma Novikov December 2, 2021 at 11:12 AM
, I've forgot about documentation ((
can you pls add new flag to
https://github.com/percona/pmm-doc/blob/2.25.0/docs/details/commands/pmm-admin.md

Former user November 22, 2021 at 1:04 PM
Flag added
Waiting for

Roma Novikov October 29, 2021 at 3:41 PM
Please check . I think it's very related to this issue (and a possible bug we can get in this issue )

Roma Novikov October 29, 2021 at 9:41 AM
Note: this DB name must be used in all cases we connect to PG like:
QAN
Exporter
STT checks / Advisors
backups (in future)
???
Details
Details
Assignee

Reporter

Priority
Components
Needs QA
Planned Version/s
Fix versions
Story Points
Sprint
Affects versions
Smart Checklist
Open Smart Checklist
Smart Checklist

The API and
PMM Add Instance
dashboard both assume that the Postgres instance to be added has a database calledpostgres
. This is not alway true. For example, DigitalOcean DBaaS instances are created with adefaultdb
database instead. The AddPostgreSQLService endpoint and thePMM Add Instance
dashboard should both allow the user to specify the database name when adding a Postgres instance.User impact:
If user dont have database called postgres then you can get broken exporter.
STR:
Start posgresql which doesnt have database called "postgres"
Try add this postgresql with pmm-admin
Exporter doesnt work.
Suggested implementation:
Add field in AddPostgreSQLServiceRequest in services.proto (PMM repo).
Add field in AddPostgreSQLRequest in postgresql.proto (PMM repo).
Add flag (PMM Admin repo).
Use this field in postgresql.go, services.go, converters.go, service_helpers.go (PMM Managed repo).
Use this field in function New in pgstatstatements.go, pgstatmonitor.go (PMM Agent repo).