pgserviceconf
pg_service.conf, often referred to in the context of pgserviceconf, is a PostgreSQL feature that stores named connection configurations for libpq-based clients such as psql. It enables users to define multiple service entries that specify host, port, database name, user, and various optional parameters, allowing connections to be made by service name rather than by supplying all parameters each time. The approach reduces duplication and simplifies switching between environments.
A service file is a plain text INI-style file named pg_service.conf. Each connection service is defined in
Common locations and discovery mechanisms include a user-specific file in the home directory, typically ~/.pg_service.conf, and
Usage and portability notes: pg_service.conf is supported by libpq-based clients and enables consistent configuration across tools.