This is the multi-page printable view of this section. .
Misc
1 - Service / Access
Separate read and write operations, route traffic correctly, and deliver PostgreSQL cluster capabilities reliably.
A service exposes database cluster capabilities to clients. It hides the details of the underlying cluster.
Services provide stable access in production, including after automatic failover in high-availability clusters. Single-node users usually do not need services.
Single-Node Users
Services are intended for production environments. Personal users and single-node clusters can connect directly through an instance name or IP address.
For example, Pigsty’s default single-node pg-meta.meta database can be connected directly using three different users:
Service Overview
Production environments use primary-replica clusters with replication. Exactly one instance, the primary, leads the cluster and accepts writes. Replicas continuously fetch change logs from the primary to keep their data consistent. Replicas also handle read-only requests, which substantially reduces primary load in workloads with many reads. Thus, separating write requests from read-only requests is common.
For frequent short connections, Pgbouncer pools requests to reduce the cost of connection and backend process creation. Operations such as ETL and database changes need direct connections that bypass the pool. Failures in high-availability clusters can trigger failover and change the primary. Write traffic must follow the new primary automatically. Services represent these access requirements: separate reads and writes, pooled or direct connections, and automatic routing after failover.
Typically, database clusters must provide this most basic service:
- Read-Write Service (primary): Can read and write to the database
For production database clusters, at least these two services should be provided:
- Read-Write Service (primary): Write data: can only be carried by the primary.
- Read-Only Service (replica): Read data: can be carried by replicas, or by the primary if there are no replicas
In addition, depending on specific business scenarios, there may be other services, such as:
- Default Direct Service (default): Allows (admin) users to access the database directly, bypassing the connection pool
- Offline Replica Service (offline): Dedicated replicas that do not handle online read-only traffic, used for ETL and analytical queries
- Standby Replica Service (standby): Read-only service without replication lag, handled by sync standby/primary for read-only queries
- Delayed Replica Service (delayed): Access old data from the same cluster at a previous point in time, handled by delayed replica
Default Services
By default, Pigsty provides four services for each PostgreSQL cluster:
| Service | Port | Description |
|---|---|---|
| primary | 5433 | Production read-write, connects to primary connection pool (6432) |
| replica | 5434 | Production read-only, connects to replica connection pool (6432) |
| default | 5436 | Admin, ETL writes, direct access to primary (5432) |
| offline | 5438 | OLAP, ETL, personal users, interactive queries |
Taking the default pg-meta cluster as an example, it provides four default services:
You can see how these four services work from the sample cluster architecture diagram:
pg_dns_target controls the DNS target of pg-meta.
The default, auto, selects the L2 VIP when enabled.
Otherwise, it selects the IP address of the inventory primary.
VIP is disabled by default.
See Accessing Services.
Service Implementation
Pigsty implements services with HAProxy on nodes. Different ports identify different services.
Pigsty enables HAProxy on each managed node, including database nodes. Database nodes have primary or replica roles, but each node exposes the same services. With the correct service port, you can access the primary read-write service through a replica node. Thus, access to any cluster instance gives access to all cluster services.
This design is similar to Kubernetes NodePort services. Each Pigsty service has two core elements:
- Access endpoints exposed through NodePort (port number, where to access?)
- Target instances selected through Selectors (instance list, who carries the load?)
Pigsty provides services up to the cluster HAProxy endpoint. Clients can reach these load balancers in several ways. See Accessing Services.
Declare all services in configuration files.
For example, pg_default_services defines the default PostgreSQL services:
Define additional services in pg_services.
Both pg_default_services and pg_services are arrays of service definition objects.
Defining Services
Pigsty allows you to define your own services:
pg_default_services: Services uniformly exposed by all PostgreSQL clusters, four by default.pg_services: Additional PostgreSQL services, can be defined at global or cluster level as needed.haproxy_services: Directly customize HAProxy service content, can be used for accessing other components
For PostgreSQL clusters, you usually need only the first two parameters.
Each service generates a configuration file on every related HAProxy instance: /etc/haproxy/conf.d/<pg_cluster>-<service>.cfg.
The following custom standby service provides read-only access without replication lag.
Add its definition to pg_services:
For the three-node pg-test example cluster, Pigsty generates /etc/haproxy/conf.d/pg-test-standby.cfg from this definition:
The selector: "[]" expression includes all three pg-test instances in the pg-test-standby backend list.
However, the Patroni /sync health check returns HTTP 200 only for the primary and synchronous standby.
Only those instances can handle requests.
The primary also matches pg_role == primary, so the backup selector marks it as a backup server.
It handles requests only when no synchronous standby can do so.
Primary Service
The Primary service provides cluster read-write access on port 5433. It is a critical production service. Its definition is:
selector: "[]"includes all cluster members in the Primary service.- Only the primary passes
check: /primaryand receives traffic. dest: defaultmakespg_default_service_destcontrol the destination.- Pigsty replaces the
destvaluedefaultwithpg_default_service_dest, whose default ispgbouncer. - Thus, the default destination is the primary connection pool on
pgbouncer_port, normally 6432.
Set pg_default_service_dest to postgres to bypass the connection pool.
The Primary service then connects directly to pg_port, normally 5432.
Use this setting when you do not need pooling.
Patroni high availability ensures that no more than one instance passes the /primary health check at a time.
Thus, the Primary service always routes traffic to the primary.
The Primary service also protects traffic routing during a split-brain condition. For example, kill -9 can stop primary Patroni without a watchdog. HAProxy sends traffic only when Patroni is alive and reports primary status. This protection is unavailable with a direct database connection.
Replica Service
The Replica service provides read-only access on port 5434. It is the next most important production service after Primary. Its definition is:
selector: "[]"includes all cluster members in the Replica service.- All instances can pass
check: /read-onlyand receive traffic. - The backup selector
[? pg_role == 'primary' || pg_role == 'offline' ]marks the primary and offline replicas as backups. - The primary or offline replicas receive traffic only when all normal replicas are down.
dest: defaultmakespg_default_service_destcontrol the destination.- Pigsty replaces the
destvaluedefaultwithpg_default_service_dest, whose default ispgbouncer, as for the Primary service. - Thus, the default destination is the replica connection pool on
pgbouncer_port, normally 6432.
The Replica service first sends read-only requests to available dedicated replicas. It sends them to the primary only when all replicas are down. For a two-node primary-replica cluster, this means it uses the replica while available and the primary when the replica fails.
The Replica service uses dedicated Offline instances only when all dedicated read-only instances are down. This separates fast online queries from slow offline queries to reduce interference.
Default Service
The Default service provides services on port 5436. It is a variant of the Primary service.
The Default service always bypasses the connection pool and connects directly to primary PostgreSQL. Use it for administration connections, ETL writes, and change data capture (CDC).
If pg_default_service_dest is postgres, Default and Primary have the same behavior.
Only their names and ports differ.
In this case, you can remove Default from the default services.
Offline Service
The Offline service listens on port 5438 and connects directly to PostgreSQL without the pool. Use it for slow queries, analytical queries, ETL reads, and personal interactive queries:
Offline routes traffic directly to dedicated offline replicas.
It can also use normal read-only instances with the pg_offline_query flag.
- The selector includes replicas with
pg_role=offlineand normal read-only instances withpg_offline_query=true. - Dedicated offline replicas do not handle Replica service requests by default. This separates fast and slow requests. Flagged normal replicas do handle those requests.
- The backup selector includes normal replicas without the offline flag. They handle Offline traffic when dedicated or flagged offline instances fail.
/replicareturns HTTP 200 only for replicas. It rejects the primary, even when the primary is the only remaining cluster instance.- Neither selector includes the primary. Thus, Offline traffic never reaches or affects the primary.
Offline provides restricted read-only access for personal interactive queries, slow analytical or ETL queries, and long transactions.
The Offline service needs special handling after a switchover.
The HAProxy /replica health check automatically rejects the new primary.
However, selector uses static pg_role and pg_offline_query inventory labels.
In a two-node primary-replica cluster, only the replica may serve Offline queries.
A switchover can then leave no eligible backend temporarily.
Reloading an unchanged inventory does not add the old primary to the backend list.
First update the inventory labels or pg_offline_query for the new plan, then reload services.
Alternatively, switch the primary back.
For a simple business model, you can remove Default and Offline. Use Primary and Replica to connect directly to the database.
Reload Services
Reload services after changes to cluster membership, service definitions, static selector labels, or relative weights. Patroni health checks handle normal Primary and Replica switchovers automatically. These switchovers need no separate reload.
Accessing Services
Pigsty provides services up to the cluster HAProxy endpoint. Clients can reach these load balancers in several ways.
The typical approach is to use DNS or VIP access, binding them to all or any number of load balancers in the cluster.

You can use different host & port combinations, which provide PostgreSQL services in different ways.
Host
| Type | Example | Description |
|---|---|---|
| Cluster Domain | pg-test | Access via cluster domain name (resolved by dnsmasq @ infra node) |
| Cluster VIP Address | 10.10.10.3 | Access via L2 VIP address managed by vip-manager, bound to primary node |
| Instance Hostname | pg-test-1 | Access via any instance hostname (resolved by dnsmasq @ infra node) |
| Instance IP Address | 10.10.10.11 | Access any instance’s IP address |
Port
Pigsty uses different ports to distinguish pg services
| Port | Service | Type | Description |
|---|---|---|---|
| 5432 | postgres | Database | Direct access to postgres server |
| 6432 | pgbouncer | Middleware | Access postgres via connection pool middleware |
| 5433 | primary | Service | Access primary pgbouncer (or postgres) |
| 5434 | replica | Service | Access replica pgbouncer (or postgres) |
| 5436 | default | Service | Access primary postgres |
| 5438 | offline | Service | Access offline postgres |
Combinations
Overriding Services
You can override service defaults in several ways. A common requirement is for Primary and Replica to bypass Pgbouncer and connect directly to PostgreSQL.
Set pg_default_service_dest to postgres.
Services with svc.dest='default' then use postgres instead of the default pgbouncer destination.
If Primary already connects to PostgreSQL, Default is redundant. You can remove it.
If you do not need to distinguish personal interactive queries from slow analytical or ETL queries, you can remove Offline.
Remove it from pg_default_services.
If replicas do not need to handle online read-only traffic, you can remove Replica from the default list.
Delegating Services
Pigsty exposes PostgreSQL services through HAProxy on nodes. All HAProxy instances in a cluster use the same service definitions.
You can instead delegate PostgreSQL services to a specific node group, such as a dedicated HAProxy load balancer cluster.
Override pg_default_services and set pg_service_provider to the proxy group name.
This example exposes the PostgreSQL Primary service on port 10013 through the proxy HAProxy node group.
Use a unique port for each delegated service in the proxy cluster.
An example of using a dedicated load balancer cluster is provided in the 20-node production environment simulation sandbox: conf/ha/simu.yml
2 - Access Control
Pigsty access-control documentation is organized by purpose:
- Access Control Concepts: role model, default privileges, database ACLs, and instance-isolation boundaries.
- Access Control Configuration:
pg_default_roles,pg_users,pg_default_privileges, and related parameters. - Authentication: HBA, SCRAM, certificate authentication, and credential management.
- HBA Configuration: PostgreSQL and PgBouncer rule syntax.
- User Management: create, update, and remove users in an existing cluster.
dbrole_offline provides independent read-only object privileges.
It does not restrict instance scope automatically.
To allow access only on offline instances, set role: offline explicitly on the corresponding HBA rule.
Verify the generated pg_hba.conf on both online and offline instances.
3 - User / Role
CREATE USER/ROLE.In this context, users refer to logical objects within a database cluster created using the SQL commands
CREATE USER/ROLE.
In PostgreSQL, users belong to the database cluster, rather than a specific database. Create business users before you create business databases.
Defining Users
Pigsty defines roles and users in database clusters through two configuration parameters:
pg_default_roles: Defines globally unified roles and userspg_users: Defines business users and roles at the database cluster level
The first parameter defines roles and users shared across the environment. The second defines business roles and users for individual clusters. Both use arrays of user definition objects.
You can define multiple users and roles. Pigsty creates global objects first, then cluster-level objects, following array order within each group. Thus, later users can belong to roles defined earlier.
Here is the business user definition for the default cluster pg-meta in the Pigsty demo environment:
Each user/role definition is an object that may include the following fields. Using dbuser_meta as an example:
- The only required field is
name. Use a valid username that is unique within the PostgreSQL cluster. - Roles do not need a
password. Business users with login access usually need one. passwordaccepts plaintext, scram-sha-256, or md5 hash strings. Avoid plaintext passwords.- Pigsty creates users and roles in array order. Define roles and groups before their members.
login,superuser,createdb,createrole,inherit,replication, andbypassrlsare Boolean flags.pgbounceris disabled by default. To add business users to the pool user list, explicitly set it totrue.
ACL System
Pigsty provides a built-in access control / ACL model. Assign its default business roles to users as required:
dbrole_readwrite: Role with global read-write access (production accounts primarily used by business should have database read-write privileges)dbrole_readonly: Role with global read-only access (if other businesses need read-only access, use this role)dbrole_admin: Role with DDL privileges (business administrators, scenarios requiring table creation in applications)dbrole_offline: Independent read-only role for ad hoc queries, ETL, and analytics; restrict its instance scope explicitly through HBA
To define your own ACL system, consider these parameters and templates:
pg_default_roles: System-wide roles and global userspg_default_privileges: Default privileges for newly created objectsroles/pgsql/templates/pg-init-roles.sql: Role creation SQL templateroles/pgsql/templates/pg-init-template.sql: Privilege SQL template
Creating Users
During the cluster initialization PROVISION phase, Pigsty creates users and roles one at a time.
It uses the definitions in pg_default_roles and pg_users.
To create users on an existing cluster, use bin/pgsql-user.
Add the definition to all.children.<cls>.pg_users, then run:
The user creation playbook is always idempotent, unlike the database creation playbook. If the target user exists, Pigsty changes its attributes to match the configuration. Thus, you can usually repeat the playbook on existing clusters.
Manual business user creation is not recommended, especially with the default Pgbouncer connection pool.
If you create users manually, you must maintain the Pgbouncer user list and keep it consistent with PostgreSQL.
The bin/pgsql-user tool and pgsql-user.yml playbook also add users to the Pgbouncer user list.
Modifying Users
The method for modifying PostgreSQL user attributes is the same as Creating Users.
First, change the required attributes in the user definition. Then run this command to apply them:
User modification changes attributes with ALTER USER; it does not delete users.
It also keeps existing privileges and groups.
It uses GRANT to add new roles.
Pgbouncer Users
Pigsty enables Pgbouncer connection pooling and manages its users by default.
Pigsty adds all users in pg_users that explicitly have the pgbouncer: true flag to the pgbouncer user list.
Users in the Pgbouncer connection pool are listed in /etc/pgbouncer/userlist.txt:
User-level connection pool parameters are maintained in a separate file: /etc/pgbouncer/useropts.txt, for example:
When you create a database, Pigsty refreshes the Pgbouncer database list. An online reload applies the changes without affecting existing connections.
Pgbouncer runs as the same dbsu as PostgreSQL.
The default is the postgres operating system user.
As dbsu, use the pgb alias for Pgbouncer administration.
When you create users, Pigsty refreshes userlist.txt and useropts.txt automatically.
An online reload applies these pool user changes, normally without affecting existing connections.
Use pgbouncer_auth_query to authenticate pool users with dynamic queries.
This is an alternative when you do not want to manage pool users directly.
4 - Database
CREATE DATABASE within a database cluster.In this context, Database refers to the logical object created using the SQL command
CREATE DATABASEwithin a database cluster.
A PostgreSQL server can serve multiple databases at the same time. In Pigsty, define the required databases in the cluster configuration.
Pigsty customizes the default template database, template1.
It creates default schemas, installs default extensions, and configures default privileges.
New databases inherit these settings from template1 by default.
By default, Pigsty adds each business database to the Pgbouncer connection pool with a 1:1 mapping.
pg_exporter automatically discovers all business databases and monitors their objects.
Define Database
Define business databases in the cluster parameter pg_databases.
This parameter is an array of database definition objects.
Pigsty creates databases in definition order.
Thus, a later database can use an earlier database as its template.
Below is the database definition for the default pg-meta cluster in the Pigsty demo environment:
Each database definition is an object.
The following meta definition shows the available fields:
The only required field is name.
It should be a valid database name that is unique within the PostgreSQL cluster.
Other parameters have defaults.
name: Database name, required.baseline: SQL file path (Ansible search path, usually infiles), used to initialize database content.owner: Database owner, default ispostgrestemplate: Template used when creating the database, default istemplate1encoding: Database default character encoding, default isUTF8, default is consistent with the instance. It is recommended not to configure and modify.locale: Database default locale, default isC, it is recommended not to configure, keep consistent with the instance.lc_collate: Database default locale string collation, default is same as instance setting, it is recommended not to modify, must be consistent with template database. It is strongly recommended not to configure, or configure toC.lc_ctype: Database default LOCALE, default is same as instance setting, it is recommended not to modify or set, must be consistent with template database. It is recommended to configure to C oren_US.UTF8.allowconn: Whether to allow connection to the database, default istrue, not recommended to modify.revokeconn: Whether to revoke connection privilege to the database? Default isfalse. Iftrue,PUBLIC CONNECTprivilege on the database will be revoked. Only default users (dbsu|monitor|admin|replicator|owner) can connect. In addition,admin|ownerwill have GRANT OPTION, can grant connection privileges to other users.tablespace: Tablespace associated with the database, default ispg_default.connlimit: Database connection limit, default is-1, meaning no limit.extensions: Object array, each object defines an extension in the database, and the schema in which it is installed.parameters: KV object, each KV defines a parameter that needs to be modified for the database throughALTER DATABASE.pgbouncer: Boolean option, whether to add this database to Pgbouncer. All databases will be added to Pgbouncer list unless explicitly specified aspgbouncer: false.comment: Database comment information.pool_auth_user: Whenpgbouncer_auth_queryis enabled, all connections to this pgbouncer database will use the user specified here to execute authentication queries. You need to use a user with access to thepg_shadowtable.pool_mode: Database level pgbouncer pool mode, default is transaction, i.e., transaction pooling. If left empty, will usepgbouncer_poolmodeparameter as default value.pool_size: Database-level Pgbouncer default pool size, default50.pool_reserve: Database-level Pgbouncer reserve pool, default30; when the regular pool is exhausted, at most this many burst connections can be added.pool_size_min: Database level pgbouncer pool size min, default is 0pool_connlimit: Database level pgbouncer connection pool max database connections, default is 100
By default, new databases use template1 as their template.
During PG_PROVISION, Pigsty configures this template with extensions, schemas, and default privileges.
New databases inherit this configuration unless you explicitly select another template.
For database access privileges, see Access Control: Database Isolation.
Create Database
Pigsty creates databases defined in pg_databases during cluster initialization.
To create a database on an existing cluster, use bin/pgsql-db.
Add the definition to all.children.<cls>.pg_databases, then run:
Here are some considerations when creating a new database:
The database creation playbook is idempotent by default.
However, a baseline script can change this behavior.
Do not usually repeat the playbook on an existing database unless you know that its baseline SQL is also idempotent.
Manual database creation is not recommended, especially with the default Pgbouncer connection pool.
If you create databases manually, you must maintain the Pgbouncer database list and keep it consistent with PostgreSQL.
The pgsql-db tool and pgsql-db.yml playbook also add new databases to the Pgbouncer database list.
If the database owner differs from the default dbsu, postgres, verify that the owner user exists first.
Always create users before you create databases.
Pgbouncer Database
By default, Pigsty enables one Pgbouncer connection pool for each PostgreSQL instance.
The pool connects through the /var/run/postgresql Unix socket.
Connection pools can improve performance for short connections and reduce concurrency contention. They prevent excessive connections from overloading the database. They also provide more options during database migration.
By default, Pigsty adds all databases from pg_databases to the Pgbouncer database list.
To exclude a database, set pgbouncer: false in its definition.
The Pgbouncer database list is in /etc/pgbouncer/database.txt.
This file includes pool parameters from each database definition:
When you create databases, Pigsty refreshes the Pgbouncer database list. An online configuration reload applies the changes, normally without affecting existing connections.
Pgbouncer runs as the same dbsu as PostgreSQL.
The default is the postgres operating system user.
As dbsu, use the pgb alias for Pgbouncer administration.
To route a managed Pgbouncer database to another node, edit /etc/pgbouncer/database.txt.
Then reload the configuration and rebuild existing server connections:
The current
pgb-routehelper edits only/etc/pgbouncer/pgbouncer.ini. Pigsty stores managed database routes in the includeddatabase.txtfile. Thus, this helper does not change managed routes.
5 - Authentication / HBA
Detailed explanation of Host-Based Authentication (HBA) in Pigsty.
Authentication supports Access Control and Default Privileges. PostgreSQL supports several authentication methods.
This page describes HBA, or Host-Based Authentication. HBA rules specify which users can access each database, from which locations, and with which authentication methods.
Client Authentication
Users must authenticate before they connect to a PostgreSQL database. By default, they use a password.
You can put the password in the connection string, but this is not secure.
Alternatively, use the PGPASSWORD environment variable or a .pgpass file.
For details, see psql and PostgreSQL Connection Strings.
For example, to connect to Pigsty’s default meta database, you can use the following connection strings:
By default, Pigsty enables server-side SSL encryption but does not verify client SSL certificates.
To use client certificates, set PGSSLCERT and PGSSLKEY, or the sslkey and sslcert connection parameters.
Use cert.yml to sign client certificates with the local CA.
Set the certificate CN to the username.
Defining HBA
In Pigsty, there are four parameters related to HBA rules:
pg_hba_rules: postgres HBA rulespg_default_hba_rules: postgres global default HBA rulespgb_hba_rules: pgbouncer HBA rulespgb_default_hba_rules: pgbouncer global default HBA rules
Each parameter is an array of HBA rule objects. A rule object can use either of these forms:
1. Raw Form
The raw form of HBA is almost identical to the PostgreSQL pg_hba.conf format:
The rules field is an array of strings.
Each string contains one raw HBA rule.
The generated file uses title as a comment to explain the following rules.
The role field selects the instance roles to which the rule applies.
Pigsty adds the rule when the instance pg_role matches role.
role: common: Add the rule to all instances.role: primary: Add the rule only to primary instances.role: replica: Add the rule only to replica instances.role: offline: Add the rule to offline instances wherepg_role=offlineorpg_offline_query=true.
2. Alias Form
The alias form simplifies HBA rule maintenance.
It replaces rules with the addr, auth, user, and db fields.
The title and role fields still apply.
addr: where - Which IP address ranges are affected by this rule?world: All IP addressesintra: All intranet IP address ranges:'10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16'infra: IP addresses of Infra nodesadmin: IP addresses ofadmin_ipmanagement nodeslocal: Local Unix Socketlocalhost: Local Unix Socket and TCP 127.0.0.1/32 loopback addresscluster: IP addresses of all members in the same PostgreSQL cluster<cidr>: A specific CIDR address block or IP address
auth: how - What authentication method does this rule specify?deny: Deny accesstrust: Trust directly, no authentication requiredpwd: Password authentication, usesmd5orscram-sha-256authentication based on thepg_pwd_encparametersha/scram-sha-256: Force use ofscram-sha-256password authentication.md5:md5password authentication, but can also be compatible withscram-sha-256authentication, not recommended.ssl: On top of password authenticationpwd, require SSL to be enabledssl-md5: On top of password authenticationmd5, require SSL to be enabledssl-sha: On top of password authenticationsha, require SSL to be enabledos/ident: Useidentauthentication with the operating system user identitypeer: Usepeerauthentication method, similar toos identcert: Use client SSL certificate-based authentication, certificate CN is the username
user: who: Which users are affected by this rule?all: All users${dbsu}: Default database superuserpg_dbsu${repl}: Default database replication userpg_replication_username${admin}: Default database admin userpg_admin_username${monitor}: Default database monitor userpg_monitor_username- Other specific users or roles
db: which: Which databases are affected by this rule?all: All databasesreplication: Allow replication connections (not specifying a specific database)- A specific database
3. Definition Location
Usually, global HBA rules belong in all.vars.
To change the defaults, copy them from conf/ha/full.yml to all.vars, then edit them.
pg_default_hba_rules: postgres global default HBA rulespgb_default_hba_rules: pgbouncer global default HBA rules
Cluster-specific HBA rules are defined in the database cluster-level configuration:
pg_hba_rules: postgres HBA rulespgb_hba_rules: pgbouncer HBA rules
Here are some examples of cluster HBA rule definitions:
Reloading HBA
HBA rules are static configuration. Reload them after changes to apply the new rules. The default rules usually need no reload for role or membership changes because they do not depend on those values.
Some HBA rules restrict access by instance role or cluster membership. Adding or removing instances, or failover, can change where these rules apply. In these cases, reload HBA to apply the latest changes.
To reload postgres/pgbouncer hba rules:
The underlying Ansible playbook commands actually executed are:
Default HBA
Pigsty provides default HBA rules with sufficient security for most uses. The rules use the alias form to make their purpose clear.
Security Hardening
For higher security, use the hardened conf/ha/safe.yml template.
It uses these default HBA rules:
See Authentication for methods and default boundaries, and Security Considerations for production hardening.
