Database connection
Port 5432 availability
If another PostgreSQL installation is already using TCP port 5432, configure that
installation for Sparrow. Create a database named rtvcp with a login role named
rtvcp using the password rtvcp. Make sure PostgreSQL is available only for
localhost connections.
Check the port in PowerShell
Get-NetTCPConnection -LocalPort 5432 -State Listen -ErrorAction SilentlyContinue
Test-NetConnection -ComputerName 127.0.0.1 -Port 5432
A successful TCP test confirms a reachable listener. Verify that the listener belongs to PostgreSQL
and that the database credentials work.
Create the login and database
Connect to the existing installation as a PostgreSQL administrator using pgAdmin or psql. Run these
statements separately, outside a transaction, only if the role and database do not already exist:
CREATE ROLE rtvcp WITH LOGIN PASSWORD 'rtvcp';
CREATE DATABASE rtvcp OWNER rtvcp;
If the role or database already exists, check its password, ownership, and permissions instead of
creating duplicates. Do not grant the Sparrow role superuser privileges.
Restrict access to this computer
In the active PostgreSQL postgresql.conf, use:
listen_addresses = 'localhost'
port = 5432
In pg_hba.conf, allow password-authenticated loopback connections for Sparrow:
host rtvcp rtvcp 127.0.0.1/32 scram-sha-256
host rtvcp rtvcp ::1/128 scram-sha-256
Review existing access rules and restart the PostgreSQL service after changing its listening address.
If other applications require remote access to this PostgreSQL installation, contact your
administrator before changing its configuration.
Keep port 5432 local. Do not forward it on your router or expose it to your LAN
or the internet with the default Sparrow credentials.