PostgreSQL /etc/postgresql/17/main/pg_ident.conf

Original 📋 Ubuntu 24.04 LTS (Noble Numbat) 72 Zeilen

Läuft auf

Ansicht:
Ubuntu 24.04 LTS (Noble Numbat)
Gleich auf:
Debian 11 (Bullseye) Debian 12 (Bookworm) Debian 13 (Trixie) Ubuntu 20.04 LTS (Focal Fossa) Ubuntu 22.04 LTS (Jammy Jellyfish)
Andere Versionen:

Details

Größe
72 Zeilen
MD5
a851d3eebbf853c646a25d241dd16767
SHA256
b4dfef08731a7d20a3bb724ad4cf3e1cd91ec01fbe51349c6a3acc5704072965
/etc/postgresql/17/main/pg_ident.conf
# PostgreSQL User Name Maps
# =========================
#
# ---------------
# Mapping Records
# ---------------
#
# Refer to the PostgreSQL documentation, chapter "Client
# Authentication" for a complete description.  A short synopsis
# follows.
#
# This file controls PostgreSQL user name mapping.  It maps external
# user names to their corresponding PostgreSQL user names.  Records
# are of the form:
#
# MAPNAME  SYSTEM-USERNAME  PG-USERNAME
#
# (The uppercase quantities must be replaced by actual values.)
#
# MAPNAME is the (otherwise freely chosen) map name that was used in
# pg_hba.conf.  SYSTEM-USERNAME is the detected user name of the
# client.  PG-USERNAME is the requested PostgreSQL user name.  The
# existence of a record specifies that SYSTEM-USERNAME may connect as
# PG-USERNAME.
#
# If SYSTEM-USERNAME starts with a slash (/), it will be treated as a
# regular expression.  Optionally this can contain a capture (a
# parenthesized subexpression).  The substring matching the capture
# will be substituted for \1 (backslash-one) if present in
# PG-USERNAME.
#
# PG-USERNAME can be "all", a user name, a group name prefixed with "+", or
# a regular expression (if it starts with a slash (/)).  If it is a regular
# expression, the substring matching with \1 has no effect.
#
# Multiple maps may be specified in this file and used by pg_hba.conf.
#
# No map names are defined in the default configuration.  If all
# system user names and PostgreSQL user names are the same, you don't
# need anything in this file.
#
# ---------------
# Include Records
# ---------------
#
# This file allows the inclusion of external files or directories holding
# more records, using the following keywords:
#
# include           FILE
# include_if_exists FILE
# include_dir       DIRECTORY
#
# FILE is the file name to include, and DIR is the directory name containing
# the file(s) to include.  Any file in a directory will be loaded if suffixed
# with ".conf".  The files of a directory are ordered by name.
# include_if_exists ignores missing files.  FILE and DIRECTORY can be
# specified as a relative or an absolute path, and can be double-quoted if
# they contain spaces.
#
# -------------------------------
# Miscellaneous
# -------------------------------
#
# This file is read on server startup and when the postmaster receives
# a SIGHUP signal.  If you edit the file on a running system, you have
# to SIGHUP the postmaster for the changes to take effect.  You can
# use "pg_ctl reload" to do that.

# Put your actual configuration here
# ----------------------------------

# MAPNAME       SYSTEM-USERNAME         PG-USERNAME

Kopieren & Einfügen

curl:
curl https://exampleconfig.com/api/v1/config/original/a851d3eebbf853c646a25d241dd16767?hint=pg_ident.conf
wget:
wget -O pg_ident.conf https://exampleconfig.com/api/v1/config/original/a851d3eebbf853c646a25d241dd16767?hint=pg_ident.conf

Für KI-Agenten

<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/a851d3eebbf853c646a25d241dd16767?hint=pg_ident.conf' /><config><app>PostgreSQL</app><os>Ubuntu 24.04 LTS (Noble Numbat)</os><location>/etc/postgresql/17/main/pg_ident.conf</location><lines>72</lines><md5>a851d3eebbf853c646a25d241dd16767</md5><sha256>b4dfef08731a7d20a3bb724ad4cf3e1cd91ec01fbe51349c6a3acc5704072965</sha256></config></prompt>

Füge es in Claude, ChatGPT oder einen anderen KI-Assistenten ein.

PostgreSQL installieren

Alpine Linux

sudo apk add postgresql

Debian

sudo apt update && sudo apt install postgresql

Red Hat Enterprise Linux

sudo yum install postgresql17-server

Ubuntu

sudo apt update && sudo apt install postgresql

Ablageort

Pfad
/etc/postgresql/17/main/pg_ident.conf
Verzeichnis
/etc/postgresql/17/main/
Bedeutung
Systemweites Konfig-Verzeichnis
Beschreibung
In /etc/ liegen systemweite Einstellungen, die alle Benutzer betreffen.

FAQ

Wann sollte ich pg_ident.conf verwenden?

Nutze sie, um eine fehlende Default-Datei wiederherzustellen, zu prüfen, was ausgeliefert wurde, oder sie gegen deine aktuelle PostgreSQL-Config zu diffen.

Wie stelle ich die Defaults von PostgreSQL wieder her?

Lad die Datei runter, sichere die aktuelle in /etc/postgresql/17/main/pg_ident.conf, ersetze sie und lade PostgreSQL neu oder starte es neu.

Ist pg_ident.conf für den produktiven Einsatz geeignet?

Das ist der Hersteller-Default für Ubuntu 24.04 LTS (Noble Numbat). Nimm sie als Basis und prüf Security- und Performance-Einstellungen, bevor du sie produktiv nutzt.

Wie unterscheidet sich das von anderen OS-Versionen?

Defaults variieren je nach Distro und Version. Diese Version passt zu Ubuntu 24.04 LTS (Noble Numbat).

Kann ich das fürs Troubleshooting von PostgreSQL nutzen?

Ja. Diff es gegen deine Version, finde Abweichungen und stell nur die Teile wieder her, die du brauchst.