Install, configure, manage, validate, and inspect PostgreSQL
Source: target-root/usr/local/libexec/solidgroundux/manage-postgresql.sh
Install, configure, manage, validate, and inspect PostgreSQL
Public functions
Internal functions
| Function | Purpose | Arguments | Output |
|---|---|---|---|
_db_check_client | Validate an IPv4 address, optionally with a CIDR prefix. | - $1: Value to inspect or write. | — |
_db_default_client_cidr | Determine the subnet of the default-route IPv4 interface. | — | — |
_db_transition | Present the framework's interruptible transition countdown. | — | — |
_db_confirm | Require approval before changing an installation. | — | — |
_db_size_suggestion | Suggest 25 percent of RAM for dedicated installations. | — | — |
_db_failure_pause | Keep an actionable error visible before menu redraw. | — | — |
_db_require_ubuntu | Require supported platform before package writes. | — | — |
_db_installed | Check package state. | — | — |
_db_run_write | Honor SolidGroundUX dryrun before changing host. | — | — |
_db_restart_active | Only restart when currently active. | — | — |
_db_check_port | Validate TCP port argument. | — | — |
_db_service | Start, stop, restart or inspect the PostgreSQL systemd service as requested. | — | — |
_db_firewall | Open the configured TCP port (not the database auth rules). | — | — |
_db_storage | Review PostgreSQL storage configuration without automatically moving existing data files. | — | — |
_db_directory_inspect | Inspect an installation target without provisioning or modifying disks. | - $1: Candidate PostgreSQL data directory. | — |
_db_clear_directory | Remove contents of an approved, unregistered data directory only. | - $1: Approved dedicated PostgreSQL data directory. | — |
_db_fresh_install | Configure and initialize a new cluster on chosen storage. | — | — |
_db_repository | Verify PostgreSQL package availability in Ubuntu repositories without adding third-party sources. | — | — |
_db_install | Install engine using the selected Ubuntu packages. | — | — |
_db_tools | Install standard engine command-line client. | — | — |
_db_logs | Display recent service journal without another management UI. | — | — |
_db_backup | Clarify scope without implementing unsafe restore operations. | — | — |
_db_prepare | Coordinate the staged PostgreSQL installation and configuration workflow. | — | — |
_db_cluster | Identify the PostgreSQL cluster from the available pg_lsclusters entries. | — | — |
_db_conf | Read a PostgreSQL cluster setting through pg_conftool. | — | — |
_db_set | Write the selected PostgreSQL server configuration setting. | - $1: PostgreSQL configuration setting name. | — |
_db_port | Read and validate the configured PostgreSQL TCP port. | — | — |
_db_configure | Collect and apply PostgreSQL network, authentication and memory settings. | — | — |
_db_storage_detail | Display the configured database data directory. | — | — |
_db_network | Review or configure the PostgreSQL TCP port and listen address. | — | — |
_db_memory | Change PostgreSQL shared_buffers only when the requested value differs | — | — |
_db_access | Set postgres password and authorize one workstation. | — | — |
_db_status | Show the live server configuration and workstation connection settings. | — | — |
_db_validate | Check PostgreSQL prerequisites, active configuration and service readiness. | — | — |
_run_action | Execute management action and retain its exit status. | - $1: Management action to execute. | — |
Description
Install, configure, manage, validate, and inspect PostgreSQL.
Usage
Run the executable from its shell command (or installed wrapper):
manage-postgresql --action status
manage-postgresql --dryrun --action storage
Script-specific options:
--action NAME,-a: Management action (supported actions:prepare,repository,install,configure,storage,network,memory,access,credentials,service,firewall,tools,validate,status,logs,backup).
PostgreSQL-specific operations
Debian/Ubuntu support multiple clusters; refuse ambiguous selections.
