DB Internals AtlasPostgreSQL 18.6 Home About

Parameter · File Locations

ident_file

Sets the server's "ident" configuration file.

  • Default: '' (empty)
  • Type: string
  • Applies: Restart required

In plain words

Where to find pg_ident.conf. It contains user name maps: rules like "OS user alice may log in as database user app". They are used by authentication methods that get the user name from outside PostgreSQL, such as peer, ident, cert and gss, when a pg_hba.conf line says map=….

For DBAs and operators

Format: MAPNAME SYSTEM-USERNAME PG-USERNAME. The system name may be a regular expression (starting with /), with \1 substitution into the PG name; since PostgreSQL 16 the PG name can also be a group (+role) or all.

# pg_ident.conf
ops     alice          postgres
certmap /^(.*)@corp\.com$  \1
SELECT map_number, map_name, sys_name, pg_username, error
  FROM pg_ident_file_mappings;

Re-read on reload, like pg_hba.conf. Failed mapping: LOG: no match in usermap "ops" for user "postgres" authenticated as "bob", then FATAL: Peer authentication failed for user "postgres".

How to change it

Change in postgresql.conf or ALTER SYSTEM, then restart the server.

See it in context

Client authentication

Related parameters

hba_file config_file data_directory

All File Locations parameters