Zum Inhalt springen
_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
Referenzen Technologien Blog Know-how Tools
Über uns Zusammenarbeit Karriere
CS EN DE
Lassen Sie uns sprechen

PostgreSQL instalace a konfigurace

25. 09. 2021 1 Min. Lesezeit intermediate

PostgreSQL je nejpokročilejší open-source relační databáze.

Instalace

sudo apt install postgresql postgresql-contrib sudo systemctl enable –now postgresql sudo -u postgres psql CREATE USER myapp WITH PASSWORD ‘secret’; CREATE DATABASE mydb OWNER myapp;

Konfigurace

postgresql.conf

listen_addresses = ‘*’ max_connections = 200 shared_buffers = 4GB effective_cache_size = 12GB work_mem = 64MB random_page_cost = 1.1

Autentizace

pg_hba.conf

local all all peer host all all 127.0.0.1/32 scram-sha-256 host all all 10.0.0.0/8 scram-sha-256

Monitoring

SELECT pid, now()-query_start AS duration, query FROM pg_stat_activity WHERE state!=’idle’ ORDER BY duration DESC; SELECT pg_database.datname, pg_size_pretty(pg_database_size(pg_database.datname)) FROM pg_database;

PostgreSQL = standard

Investujte do tuningu shared_buffers a work_mem.

postgresqlsqlkonfigurace
Teilen:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.