Manage PostgreSQL

SolidGroundUX DocumentationSolidGroundUX
NL

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
FunctionPurposeArgumentsOutput
_db_check_clientValidate an IPv4 address, optionally with a CIDR prefix.- $1: Value to inspect or write.—
_db_default_client_cidrDetermine the subnet of the default-route IPv4 interface.——
_db_transitionPresent the framework's interruptible transition countdown.——
_db_confirmRequire approval before changing an installation.——
_db_size_suggestionSuggest 25 percent of RAM for dedicated installations.——
_db_failure_pauseKeep an actionable error visible before menu redraw.——
_db_require_ubuntuRequire supported platform before package writes.——
_db_installedCheck package state.——
_db_run_writeHonor SolidGroundUX dryrun before changing host.——
_db_restart_activeOnly restart when currently active.——
_db_check_portValidate TCP port argument.——
_db_serviceStart, stop, restart or inspect the PostgreSQL systemd service as requested.——
_db_firewallOpen the configured TCP port (not the database auth rules).——
_db_storageReview PostgreSQL storage configuration without automatically moving existing data files.——
_db_directory_inspectInspect an installation target without provisioning or modifying disks.- $1: Candidate PostgreSQL data directory.—
_db_clear_directoryRemove contents of an approved, unregistered data directory only.- $1: Approved dedicated PostgreSQL data directory.—
_db_fresh_installConfigure and initialize a new cluster on chosen storage.——
_db_repositoryVerify PostgreSQL package availability in Ubuntu repositories without adding third-party sources.——
_db_installInstall engine using the selected Ubuntu packages.——
_db_toolsInstall standard engine command-line client.——
_db_logsDisplay recent service journal without another management UI.——
_db_backupClarify scope without implementing unsafe restore operations.——
_db_prepareCoordinate the staged PostgreSQL installation and configuration workflow.——
_db_clusterIdentify the PostgreSQL cluster from the available pg_lsclusters entries.——
_db_confRead a PostgreSQL cluster setting through pg_conftool.——
_db_setWrite the selected PostgreSQL server configuration setting.- $1: PostgreSQL configuration setting name.—
_db_portRead and validate the configured PostgreSQL TCP port.——
_db_configureCollect and apply PostgreSQL network, authentication and memory settings.——
_db_storage_detailDisplay the configured database data directory.——
_db_networkReview or configure the PostgreSQL TCP port and listen address.——
_db_memoryChange PostgreSQL shared_buffers only when the requested value differs——
_db_accessSet postgres password and authorize one workstation.——
_db_statusShow the live server configuration and workstation connection settings.——
_db_validateCheck PostgreSQL prerequisites, active configuration and service readiness.——
_run_actionExecute 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.