[FEAT] Add database instance registry to centralize connection settings #467

Closed
opened 2026-04-05 16:16:31 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Kauavitorio on 9/10/2025

Description

Currently, when adding a new database in Postgresus, users must manually provide connection parameters — host, port, username, and password — for each database entry. This approach causes repetitive data entry, increases the chance of human error, and makes maintenance more cumbersome if connection details change.

Introducing a Database Instance registry would allow central management of connection settings, which can then be linked to multiple databases.

Proposed Design

1. Instance Entity

  • Fields:

    • name (unique identifier, string)
    • host (string)
    • port (integer)
    • username (string)
    • password (string, securely stored)
    • Optional: ssl_mode / connection_options

2. Linking with Database

  • Each Database record would reference an instance_id.
  • Reduces duplication of connection parameters.

3. Example Workflow

  1. User creates an instance with all connection parameters.
  2. When registering a database, the user selects an existing instance.
  3. Postgresus uses the instance settings automatically for operations like backup or monitoring.

4. Benefits

  • Reduced duplication: Shared connection parameters are defined only once.
  • Simplified maintenance: Updating connection details in the instance updates all linked databases.
  • Scalability: Ideal for environments with many instances and databases.
  • Lower risk of configuration errors.

5. Real-world Scenario

  • Environment: 7 PostgreSQL instances, each with ~9 databases (~63 total).
  • With an instance registry, only 7 instance records need to be maintained instead of 63 separate sets of connection details.

This change would significantly improve usability, reduce errors, and streamline database management in complex environments.

*Originally created by @Kauavitorio on 9/10/2025* ## Description Currently, when adding a new database in Postgresus, users must manually provide connection parameters — host, port, username, and password — for each database entry. This approach causes repetitive data entry, increases the chance of human error, and makes maintenance more cumbersome if connection details change. Introducing a **Database Instance registry** would allow central management of connection settings, which can then be linked to multiple databases. ## Proposed Design ### 1. Instance Entity * Fields: * `name` (unique identifier, string) * `host` (string) * `port` (integer) * `username` (string) * `password` (string, securely stored) * Optional: `ssl_mode` / `connection_options` ### 2. Linking with Database * Each `Database` record would reference an `instance_id`. * Reduces duplication of connection parameters. ### 3. Example Workflow 1. User creates an instance with all connection parameters. 2. When registering a database, the user selects an existing instance. 3. Postgresus uses the instance settings automatically for operations like backup or monitoring. ### 4. Benefits * **Reduced duplication:** Shared connection parameters are defined only once. * **Simplified maintenance:** Updating connection details in the instance updates all linked databases. * **Scalability:** Ideal for environments with many instances and databases. * **Lower risk of configuration errors.** ### 5. Real-world Scenario * Environment: 7 PostgreSQL instances, each with \~9 databases (\~63 total). * With an instance registry, only 7 instance records need to be maintained instead of 63 separate sets of connection details. --- This change would significantly improve usability, reduce errors, and streamline database management in complex environments.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/databasus#467